๐ย ****Reference
๐ ****Chapter
Class component
Function component
Client Component
Server Component
Shared Component
Polymorphic Component
Component
- component
- ์ปดํฌ๋ํธ
- ๊ด๋ จ๋ ์ฝ๋ ๋ฉ์ด๋ฆฌ๋ฅผ ๋ชจ์ ํ๋์ ๋
๋ฆฝ๋ ๊ฐ๋
์ผ๋ก ์ถ์ํ ํ๋ ๊ธฐ๋ฒ์ ํ๋ก๊ทธ๋๋ฐ์์ ๊ฐ๋ฐ์์ ์ฌ๊ณ ๋ ฅ์ ๋น์ฝ์ ์ผ๋ก ๋์ฌ ์ค๋ค.
- ์ํ์ UI ์ฝ๋๋ฅผ ์ด๋ฃจ์ด์ง ํ๋ฉด ๊ฐ๋ฐ์์๋ component๋ผ๋ ๊ฐ๋
์ ์ฌ์ฉํด ์ถ์ํ ํ ์ ์๋ค.
- ๋ชจ๋ ์ํ์ UI๋ฅผ ๋ด๊ณ ์๋ค๋ฉด ์ญํ ์ ๋ถ๋ฆฌํด ์์ component๋ก ๋๋๋ ๊ฒ์ด ์ข๋ค. โ ๋ ์ฝ๊ฒ ์ฝํ๊ณ ์์ ํ๊ฒ ์์ ํ ์ ์๊ธฐ ๋๋ฌธ์ด๋ค.
- ์ปค์คํ
์ปดํฌ๋ํธ๋ ๋๋ฌธ์๋ก ์์ํด์ผ ํ๋ค. โ ๋ด์ฅ HTML ์์์ ๊ตฌ๋ณ๋์ด์ผ ํ๊ธฐ ๋๋ฌธ์ด๋ค.
Controlled components
- controlled components
- ์ปจํธ๋กค๋ ์ปดํฌ๋ํธ
- ์ ์ด ์ปดํฌ๋ํธ
- ํด๋์ค๋ก ์ ๊ณตํ๋ React component๋ ์ํ ๊ด๋ฆฌ๋ฅผ ์ํ ๋ด๋ถ ๋ณ์ state๋ฅผ ๊ฐ์ง๊ณ ์๋ค.