useStore 주의사항

김용희·2022년 8월 30일
0

next-dev.js?36dd:24 Warning: Cannot update a component (SearchPage) while rendering a different component (CustomApp). To locate the bad setState() call inside CustomApp, follow the stack trace as described in https://reactjs.org/link/setstate-in-render

useStore _app 작성시 useEffect 안에 작성해줘야한다
페이지가 Mount 되기전, useStore에서 상태값을 저장전,
SearchPage에서 useStore 상태값을 불러와서 나타나는 Error 라고 추측된다

profile
He threw his knapsack over the brick wall

0개의 댓글