0

Recently we upgraded the application's react version from V16 to V17 after that we are getting this warning in the console when developing the application on dev env locally.

Warning: Did not expect server HTML to contain a <nav> in <div>.

After seeing the same issue on stack overflow it seems like this issue is related to the content that is being rendered being different before we hydrate it for SSR.

But I'm not able to find the exact solution for that so I'm seeking help from the community.

I'm also adding a screenshot of the same warning.

Rahul
  • 201
  • 1
  • 2
  • 4
  • Does this answer your question? [React 16 warning "warning.js:36 Warning: Did not expect server HTML to contain a
    in
    ."](https://stackoverflow.com/questions/45350360/react-16-warning-warning-js36-warning-did-not-expect-server-html-to-contain-a)
    – Jax-p Aug 29 '22 at 07:15
  • please provide the code giving you this error ! – monim Aug 29 '22 at 07:28

0 Answers0