-
Notifications
You must be signed in to change notification settings - Fork 11
directory structure
๋จ์ ํธ edited this page Nov 19, 2019
·
2 revisions
๋งํฌ์ MultipleComponentsOneStyleFile ๋ฐฉ์์ ๋ฐ๋ฅด๊ธฐ๋ก ํ๋ค.
MultipleComponentsOneStyleFile
|-- Button.js
|-- Header.js
|-- Wrapper.js
|-- styles.js
|-- index.js
์์ Button.js, Header.js, Wrapper.js ๋ฅผ styles.js์์ ๋ฌถ๋๋ค. index.js๋ styles.js ๋ง import ํ์ฌ styled component๋ฅผ ์ ์ฉํ๋ค.
ํน์ ์ปดํฌ๋ํธ(A)์๋ง ์ฌ์ฉ๋๋ ํ์ ์ปดํฌ๋ํธ(B)๋ A์ ํ์ ๋๋ ํ ๋ฆฌ์ ๋ฃ๋๋ค.
- components ๋๋ ํ ๋ฆฌ์๋ ๋ค๋ฅธ ์ปดํฌ๋ํธ ํน์ ์ฌ๋ฌ containers์์ 2๋ฒ ์ด์ ์ฌ์ฉ๋๋ ์ปดํฌ๋ํธ๋ฅผ ๋ฃ๋๋ค.
- containers ๋๋ ํ ๋ฆฌ์๋ Page ์ปดํฌ๋ํธ๊ฐ ๋ค์ด๊ฐ๋ค.
- ์ด๋ ํ ์ปดํฌ๋ํธ๊ฐ ํน์ ํ Page์์๋ง ์ฌ์ฉ๋๋ค๋ฉด, ํด๋น Page ์ปดํฌ๋ํธ ํ์ ์ปดํฌ๋ํธ์ ๋ฃ๋๋ค.