react-reverse-portal
react-reverse-portal copied to clipboard
Nextjs error
Has anyone tried to run this on Nextjs? Getting an error:
"Cannot read property 'getInitialPortalProps' of null"
As far as I know everything should work fine with Nextjs, or any other React framework. One thing that might be tricky though is if Nextjs automatically tries to render your portals with SSR. Because portals interact with the DOM directly, lots of SSR setups might not work, so for now it's generally recommended to avoid rendering portals on the server-side entirely.
https://github.com/httptoolkit/react-reverse-portal/issues/3 has a little more context if that's useful. Do you think that might be the issue here?