[Redux] Redux Thunk, Redux Toolkit
[ Builder Callback 표기법 ] redux toolkit - thunk 를 이용해서 비동기 작업을 처리하는 방법 by 생활코딩 - 전체 코드 const status = useSelector(state => { return state.counter.status; }); const count = useSelector(state => { return state.counter.value; }); { dispatch(asyncUpFetch()); }}>+ async thunk {count} | {status} const asyncUpFetch = crateAsynckThunk( 'counterSlice/asyncUpFetch', async() => { const resp = await fetch('h..
Redux
2022. 12. 12. 04:12