๐ ์ปดํฌ๋ํธ ์์ฑ ๊ท์น
/์ปดํฌ๋ํธ_์ด๋ฆ
์ปดํฌ๋ํธ ์ด๋ฆ.jsx
Style.ts
import * as Style from โ./styleโ
๐ ์ปดํฌ๋ํธ ์ฝ๋ ์์ฑ ๊ท์น
js์ผ ๋
- ์ฝ๋ ์์ฑ ์์
-
์ปดํฌ๋ํธ
-
propTypes
-
defaultProps

ts์ผ ๋
- ์ฝ๋ ์์ฑ ์์
- ํด๋น์ปดํฌ๋ํธ์๋ง ์ฐ์ด๋ ํ์
์ ์ปดํฌ๋ํธ ์๋จ์ interface๋ก ์ ์
- interface ์ด๋ฆ์ `์ปดํฌ๋ํธ ์ด๋ฆProps``
๐ ํจ์ ์์ฑ ๊ท์น
๐ ๋ค์ด๋ฐ ๊ท์น
PascalCase
: React component(function, class)
camelCase
: variable(const, let), JavScript function, custom hook, props
UPPER_SNAKE_CASE
: tuple(as const
๋ฑ)
๐ ํ๋ก์ ํธ ์ํคํ
์ณ