react-useportal
react-useportal copied to clipboard
`Warning: Did not expect server HTML to contain a <div> in <div>.` in nextjs React-17 ssr.
Describe the bug
Warning: Did not expect server HTML to contain a <div> in <div>.
in nextjs React-17 ssr.
⚠️ Make a Codesandbox ⚠️ https://codesandbox.io/s/useportal-in-nextjs-codesandbox-container-forked-oh10i?file=/pages/index.js
To Reproduce
Run the sandbox and console shows warning message.
Expected behavior No warning message
I was wondering what was causing this. I will def take a look asap. Bare with me, things are kind of crazy for me right now.
Guess we never resolved this one? I'm getting it too.
Happy to accept a PR.
I just sorted it out by rendering null on the server and only rendering the portal on the client.
I just sorted it out by rendering null on the server and only rendering the portal on the client.
Same.