에러 관련해서 질문드립니다.
278
작성한 질문수 43
현재 제 depedencies 버전은 아래와 같습니다. 강의도중에 next-redux-wrapper 였나 특정 라이브러리 6버전인가 였던것같은데 버전때문에 문제가 생긴건가 싶어서 정확히 기억나지않아서 올립니다..
그리고 현재 저한테 발생하고있는 경고문은 아래와 같습니다.

4. WrappedApp created new store with withRedux(App) { initialState: undefined, initialStateFromGSPorGSSR: undefined }
Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.
at Overflow (/Users/seungwon/Desktop/nextest/front/node_modules/rc-overflow/lib/Overflow.js:42:32)
at InheritableContextProvider (/Users/seungwon/Desktop/nextest/front/node_modules/rc-menu/lib/context/MenuContext.js:39:23)
at Menu (/Users/seungwon/Desktop/nextest/front/node_modules/rc-menu/lib/Menu.js:76:32)
at InternalMenu (/Users/seungwon/Desktop/nextest/front/node_modules/antd/lib/menu/index.js:73:37)
at Menu (/Users/seungwon/Desktop/nextest/front/node_modules/antd/lib/menu/index.js:165:37)
at div
at AppLayout (webpack-internal:///./components/AppLayout.js:36:3)
at Home
at App (webpack-internal:///./pages/_app.js:24:3)
at Provider (/Users/seungwon/Desktop/nextest/front/node_modules/react-redux/lib/components/Provider.js:21:20)
at withRedux(App) (/Users/seungwon/Desktop/nextest/front/node_modules/next-redux-wrapper/lib/index.js:207:40)
at AppContainer (/Users/seungwon/Desktop/nextest/front/node_modules/next/dist/next-server/server/render.js:28:952)
일단 문제가 두가지인것같은데 초기값이 undefined이다.
4. WrappedApp created new store with withRedux(App) { initialState: undefined, initialStateFromGSPorGSSR: undefined }
강의에서 말했듯이 reducer 에 default 로 초기값 설정해주었습니다.
그래도 해당 에러는 사라지지않네요.. redux-devtools 확인해봐도 동작하는데는 문제가 없는데 왜 저런 경고문이 발생하는걸까여?
그리고 그아래 Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. 이것도 해결해본다고 찾아봤는데 경고문에 링크로 https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
되어있어서 들어가봤는데 이해가 정확히 안됩니다.. 복습차 다시 들으면서 하는데 원래 없었던 에러가 발생하네요.
답변 1
넥스트 버젼 질문
0
90
2
로그인시 401 Unauthorized 오류가 뜹니다
0
104
1
무한 스크롤 중 스크롤 튐 현상
0
191
1
특정 페이지 접근을 막고 싶을 때
0
116
2
createGlobalStyle의 위치와 영향범위
0
102
2
인라인 스타일 리렌더링 관련
0
97
2
vsc 에서 npm init 설치시 오류
0
157
2
nextjs 15버전 사용 가능할까요?
0
166
1
화면 새로고침 문의
0
129
1
RTK에서 draft, state 차이가 있나요?
0
160
2
Next 14 사용해도 될까요?
0
455
1
next, node 버전 / 폴더 구조 질문 드립니다.
0
358
1
url 오류 질문있습니다
0
214
1
ssh xxxxx로 우분투에 들어가려니까 port 22: Connection timed out
0
391
1
sudo certbot --nginx 에러
0
1292
2
Minified React error 콘솔에러 (hydrate)
0
477
1
카카오 공유했을 때 이전에 작성했던 글이 나오는 버그
0
255
1
프론트서버 배포 후 EADDRINUSE에러 발생
0
337
1
npm run build 에러
0
525
1
front 서버 npm run build 중에 발생한 에러들
0
398
1
서버 실행하고 브라우저로 들어갔을때 404에러
0
350
2
css 서버사이드 랜더링이 적용되지 않아서 문의 드립니다.
0
290
1
팔로워 3명씩 불러오고 데이터 합쳐주는걸로 바꾸고 서버요청을 무한으로하고있습니다.
0
249
2
해시태그 검색에서 throttle에 관해 질문있습니다.
0
206
1





