3 to 6 hooks & c
6 to 12 pub-l
12 to 6 ins
6 to 12 pub-l / fur/ .../ clo..?
함수형 프로그래밍
코드의 길이를 줄여줌
만들어 쓰기
1) useState
2) useInput
3) useEffect : componentDidMount/componentWillUnMount/ componentDidUpdate, function and deps
useEffect가 mount 됐을 때
useEffect가 willUnMount 될 때 function return (removeEventListener)
4) useTiitle
5) useClick
props 대신에 context
하위컴포넌트들이 공유
간단한 데이터는 props
-> 같은 변수값을 공유할 범위
-> <00context.Provider value={공유원하는 값}> ~ </00context.Provider>
다른 파일에서 공유하고 싶을때는 export 변수 함수 정의
state argument를 mutate 하거나(return x/ immer) new state를 return 하거나
You don't have to write switch/case by using createReducer...!
configureStore
const store = configureStore(reducer); =>redux developer tool 사용가능
createSlice 코드의 양을 줄여줌 (options 1) name 2 )initialState 3) reducers)