You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that when the app is loaded on a cross-domain iFrame nextJS (dev server) does not hydrate SSR pages / components unless they are visible on the screen.
If you run the same project on a "same-domain" website it works as expected.
If you remove visibility: hidden or display:none it works on both "cross and same domain" environment.
This behaviour was observed when upgrading from 9.2.0 to 9.2.1 (or greater)
To Reproduce
Clone this repository (there are some instructions on the readme file as well)
Set up your /etc/hosts file and point the domain to your localhost: 127.0.0.1 yourcustomdomain.dev.com
Go to the root folder and run nextJS devServer with yarn dev
Go to the public folder and serve index.html, you could use php local server if you want: php -S 0.0.00:8080
Open the browser and go to http://localhost:8080
Open the browser console and observe the logs
Only the iframe init log will be present and none of the logs from the HomePage will be displayed
The logs from HomePage will be triggered if you press "show" to display the component (removes the visibility: hidden css property)
Expected behavior
It is expected that when using the development server it would hydrate / rerender the components on a cross-domain iframe. Is that right?
Screenshots
System information
OS: macOs 10.15.7
Browser: Chrome Version 86.0.4240.80
Version of Next.js: >= 9.2.1
Version of Node.js: 10.16.0
The text was updated successfully, but these errors were encountered:
@gutofoletto I think this is more of an react's problem than the nextjs's i use suppressHydrationWarning prop to true for not getting issue in react js when using iframe.
But I also created the Seperate Component ( Client Side ) which is by default suppressHydrationWarning
Bug report
Describe the bug
It seems that when the app is loaded on a cross-domain iFrame nextJS (dev server) does not hydrate SSR pages / components unless they are visible on the screen.
visibility: hidden
ordisplay:none
it works on both "cross and same domain" environment.This behaviour was observed when upgrading from 9.2.0 to 9.2.1 (or greater)
To Reproduce
/etc/hosts
file and point the domain to your localhost:127.0.0.1 yourcustomdomain.dev.com
root
folder and run nextJS devServer withyarn dev
public
folder and serveindex.html
, you could use php local server if you want:php -S 0.0.00:8080
http://localhost:8080
iframe init
log will be present and none of the logs from theHomePage
will be displayedHomePage
will be triggered if you press "show" to display the component (removes thevisibility: hidden
css property)Expected behavior
It is expected that when using the development server it would hydrate / rerender the components on a cross-domain iframe. Is that right?
Screenshots
System information
The text was updated successfully, but these errors were encountered: