[React] ๋ฆฌ์•กํŠธ์˜ Key์— ๋Œ€ํ•ด ์•Œ์•„๋ณด์ž
ยท
Frontend/React
ํ•œ ํšŒ์‚ฌ์˜ ๊ธฐ์ˆ  ์ธํ„ฐ๋ทฐ์—์„œ ๋ฆฌ์•กํŠธ์˜ key์— ๋Œ€ํ•œ ์งˆ๋ฌธ์„ ๋ฐ›์•˜๋‹ค. ํ•ด๋‹น ์งˆ๋ฌธ์— ๋Œ€ํ•œ ๋Œ€๋‹ต์„ ํ•˜๋Š” ๊ณผ์ •์—์„œ ๊ทธ๋™์•ˆ์— ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋ฉด์„œ ๋ฆฌ์ŠคํŠธ์˜ ๊ฐ ํ•ญ๋ชฉ์— key๋ฅผ ํ• ๋‹นํ•˜๋Š” ๊ฒƒ์„ ๋„ˆ๋ฌด ๋‹น์—ฐ์‹œํ•œ ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค์–ด ์ด์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๋ ค๊ณ  ํ•œ๋‹ค. ๋ฐฐ์—ด์—์„œ ๋ฐ์ดํ„ฐ ๋ Œ๋”๋ง const people = [ { id: 0, name: 'Creola Katherine Johnson', profession: 'mathematician', }, { id: 1, name: 'Mario José Molina-Pasquel Henríquez', profession: 'chemist', }, ]; export default function List() { const listItems = people.map((person) =>..
[VS code] React ์œ ์šฉํ•œ ๊ฐœ๋ฐœ Tools ๋ฐ Extension ์„ค์น˜
ยท
Frontend/VS Code
๐Ÿ“Œ Tools React Developer Tools๋ฅผ ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜๋ฉด, ํฌ๋กฌ ์›น ๋ธŒ๋ผ์šฐ์ €์—์„œ ๊ฐœ๋ฐœ์ž ๋ชจ๋“œ(F12)๋กœ ์ปดํฌ๋„ŒํŠธ ๊ตฌ์กฐ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๊ณ  ๋ณ€๊ฒฝํ•˜๋ฉด์„œ ํ…Œ์ŠคํŠธํ•˜๊ธฐ์— ์šฉ์ดํ•˜๋‹ค. (์‚ฌ์šฉ ๊ถŒ์žฅ๐Ÿ‘) https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi React Developer Tools Adds React debugging tools to the Chrome Developer Tools. Created from revision 336ac8ceb on 7/13/2022. chrome.google.com ๐Ÿ“Œ Extension Reactjs Code Snippets rcc + tab, rsi..
_์„ฑํ˜ธ_
'react' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก