질문&답변
dispatch("LOGIN",res.data?.user); 쪽에서 에러가 뜹니다 ㅜ
// 제 코드입니다. ㅠㅠ export const AuthProvider = ({ children }: { children: React.ReactNode }) => { const [state, defaultDispatch] = useReducer(reducer, { user: null, authenticated: false, loading: true, }); const dispatch = (type: string, payload?: any) => { defaultDispatch({ type, payload }); }; return ( {children} ); };
- 좋아요수
- 0
- 댓글수
- 4
- 조회수
- 591





