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