목록2024/04/09 (1)
coding etude
[ReactJs(Ts)] NextJs : error : Hydration failed because the initial UI does not match what was rendered on the server 해결
ReactJs, NextJs, Recoil을 기반으로 작업중 발생한 에러로 Hydration failed because the initial UI does not match what was rendered on the server. Warning: Expected server HTML to contain a matching {children} ); 위 코드 처럼 html은 테그 내에 모든 내용이 담겨야 하는데 그 순서가 잘못 되어서 header가 랜더링 되지 못했던 정말 가장 단순하고 멍청한 실수였다.. 그래서 나온 결론은 해당오류가 발생하는 지점의 html 코드에 무언가 분명 실수가 존재한다는 것이다. 예를 들어 이렇게 사용할 수 없는 테그들이 발생하거나 이런식의 테그 내에 공백이 발생 한다거나 하게 ..
ReactJs
2024. 4. 9. 22:08