๋ชฉ๋ก2022/05/04 (2)
whatisthis?
REFERENCE SCSS ๊ฐ์ด๋ SCSS SASS๋ CSS pre-processor๋ก์, ๋ณต์กํ ์ก์ ์ ์ฝ๊ฒ ํด์ฃผ๊ณ ์ฝ๋์ ์ฌํ์ฉ์ฑ์ ๋์ฌ์ค. (์ ์ง๋ณด์ ์ฉ์ด) ๋ณ์ Variable ์ ์ธ CSS์ ๋ณ์ ๊ฐ๋ ์ ๋์ ํด์ค. ๋ณ์ ์ฌ์ฉ์ $๊ธฐํธ๋ฅผ ์ฌ์ฉ. $primary-color: #333; body { background: $primary-color; } Variable Scope ํน์ ์ ํ์์์ ๋ณ์ ์ ์ธ์, ํด๋น ์ ํ์ ์์์๋ง ์ ๊ทผ ๊ฐ๋ฅ. ํ๋๊ทธ (flag) ์ ์ญ ๋ณ์ ์ค์ ์ : !global ๊ธฐ๋ณธ ๊ฐ ์ค์ ์ (๋ณ์๊ฐ undefined๋ null์ผ๋) : !default ํ๋๊ทธ๋ mixin ์์ฑ์ ์ ์ฉํ๊ฒ ์ฌ์ฉ๋จ. body { $primary-color: #eee !global; $sub-color:..
์ฐธ๊ณ ๋ฌธ์ My velog Redux 1. ์ฉ์ด ์ค๋ช ์ก์ ์์ฑํจ์ (action creator) ๋จ์ํ ๋งค๊ฐ๋ณ์๋ฅผ ๋ฐ์์์ ์ก์ ๊ฐ์ฒด ํํ๋ก ๋ง๋ค์ด์ค. ๋์ค์ ์ปดํฌ๋ํธ์์ ๋์ฑ ์ฝ๊ฒ ์ก์ ์ ๋ฐ์์ํค๊ธฐ ์ํจ. ๋ณดํต export ํค์๋๋ฅผ ๋ถ์ฌ์ ๋ค๋ฅธ ํ์ผ์์ ๋ถ๋ฌ์ ์ฌ์ฉํจ. ๋ฆฌ๋์ (reducer) ๋ณํ๋ฅผ ์ผ์ผํค๋ ํจ์. state,action ๋๊ฐ์ง์ ๋งค๊ฐ๋ณ์๋ฅผ ๋ฐ์์ด. ํ์ฌ ์ํ์ ์ก์ ์ ์ฐธ๊ณ ํ์ฌ ์๋ก์ด state๋ฅผ ๋ฆฌํดํจ. ๋ฆฌ๋์ค์์๋ ์ฌ๋ฌ๊ฐ์ ๋ฆฌ๋์๋ฅผ ๋ง๋ค๊ณ ํฉ์ณ์ ๋ฃจํธ ๋ฆฌ๋์(Root Reducer)์ ๋ง๋ค ์ ์์. ์ฐธ๊ณ useReducer์์๋ default:์ throw new Error('Unhandled Action')์ ๋ฃ์ง๋ง, ๋ฆฌ๋์ค์ reducer์์๋ state๋ฅผ ๊ทธ..