๋ณธ๋ฌธ์œผ๋กœ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์ฝ˜์†”์—๋„ ๋™์ผํ•œ ์—๋Ÿฌ๊ฐ€ ํ‘œ์‹œ๋˜์—ˆ๋‹ค.

 

React๋กœ ๊ฐ„๋‹จํ•œ Clock์ปดํฌ๋„ŒํŠธ๋ฅผ ๋งŒ๋“ค๊ณ  index.js ์ˆ˜์ • ํ›„ ๋ Œ๋”๋ง์„ ํ•˜์˜€๋”๋‹ˆ

์œ„์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค.

render๋Š” ํ•จ์ˆ˜๊ฐ€ ์•„๋‹ˆ๋ผ๊ณ  ํ•œ๋‹ค.

 

์›์ธ

 

์•Œ๊ณ ๋ณด๋‹ˆ ReactDOM.render๋Š” React 18 ์ด์ƒ ๋ฒ„์ „์—์„œ๋Š” ์ง€์›ํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.

ReactDOM.render ๋Œ€์‹  createRoot๋ฅผ ์‚ฌ์šฉํ•˜๋ผ๊ณ  ๋ช…์‹œ๋˜์–ด์žˆ๋‹ค.

์ฐธ๊ณ : https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis

 

 

๋‚˜์˜ React ๋ฒ„์ „์„ ํ™•์ธํ•ด๋ณด๋‹ˆ ์ตœ์‹  ๋ฒ„์ „์ธ 18.2.0์ด์—ˆ๋‹ค.

์›์ธ์„ ์ฐพ์•˜์œผ๋‹ˆ ํ•ด๊ฒฐํ•˜๋Ÿฌ ๊ฐ€๋ณด์ž.

 

ํ•ด๊ฒฐ

์ด์ œ ReactDOM.render๋ฅผ createRoot๋กœ ๋ฐ”๊ฟ”๋ณด์ž.

๋ Œ๋”๋ง์ด ์ •์ƒ์ ์œผ๋กœ ๋˜์—ˆ๋‹ค. ์ฝ˜์†”๋„ ๊นจ-๋—ํ•˜๋‹ค.

 

'Web > React' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[React] 7. State and Lifecycle  (0) 2023.11.05
[React] 6. Components and Props  (0) 2023.11.05
[React] 6. Rendering Elements  (0) 2023.11.05
[React] Error: Already included file name  (0) 2023.11.05
[React] 4. JSX  (0) 2023.11.05