fastcampus์ ํ์ํ ๊ฐ์ฌ๋์ ๊ฐ์๋ฅผ ๋ฐ๋ผ ์ค์ตํ ํ,
ํ์ตํจ๊ณผ๋ฅผ ๋์ด๊ธฐ ์ํด ๋ค์ ํ ๋ฒ ํผ์์ ์ ๋ง์ ๋ฏธ๋ ํด์ฆ ํ๋ก๊ทธ๋จ์ ๊ตฌํํ ๊ฒ์
๋๋ค.
Redux์ React ํ
์ฌ์ฉ์ ์ฐ์ตํ๊ธฐ ์ํด
๋์์ธ๋ณด๋ค๋ ๊ธฐ๋ฅ์ ๊ตฌํํ๋ ๊ฒ์ ์ง์คํ๋ฉฐ ๋ง๋ค์์ต๋๋ค.
Redux ํ๊ฒฝ์ ์
ํ
ํ๋ ๋ฒ์ ๋ฐฐ์ ๊ณ ,
subReducer๋ค์ rootReducer์ ๋ด์์ index.jsํ์ผ์ ์ฐ๊ฒฐ์ํค๊ณ ,
component์ ์ฐ๊ฒฐ์์ผ์ ์ปดํฌ๋ํธ ๋จ์๋ก ๊ตฌํํ๋ ๋ฒ์ ๋ฐฐ์ ์ต๋๋ค.
useSelector์ useDispatch์ ๊ธฐ๋ฅ๊ณผ ์ฌ์ฉ๋ฒ์ ์ตํ์ต๋๋ค.
- Redux ํ๊ฒฝ์ ์ ํ ํ ์ ์์ต๋๋ค.
- Provider๋ฅผ ์ด์ฉํด store๋ฅผ ์ฐ๋ํ ์ ์์ต๋๋ค.
- React Component์ Redux๋ฅผ ์ฐ๊ฒฐ์ํฌ ์ ์์ต๋๋ค.
- useSelector์ useDispatch๋ฅผ ํ์ฉํ ์ ์์ต๋๋ค.
- styled component๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.