contextAPI 주의점

YU YU·2022년 9월 1일
0

React+Typescript+NextJs

목록 보기
1/2
const dispatch = useStateDispatch();

dispatch({type:'ssss',payload:'sssssss'});

try catch문에서
이 두 함수를 같은 함수 레벨에서 써야한다.
둘 중 하나라도 다른 레벨에 있으면 하면 작동이 안된다....

이상 뻘 짓...

profile
코딩 재밌어요!

0개의 댓글