-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flicker on hydrate when using Parcel SSR #201
Comments
👍 will take a look |
- fullHtml = fullHtml.replace(`<div id="app">`, `\n<div id="app">${html}</div>`)
+ fullHtml = fullHtml.replace(`<div id="app">`, `\n<div id="app">${html}`)
+ const Simple = lazy(() => import("./pages/simple"));
....
- {renderPage(lazy(() => import("./pages/simple")))()}
+ {renderPage(Simple)()}
3. Please use `dev` mode to debug the build - hydrate will complain about markup mismatch "create-bundle:client": "cross-env NODE_ENV=development BABEL_ENV=client parcel build app/index.html -d dist/client --no-source-maps --no-minify --public-url /dist/client",
|
Thanks!!! So happy to find a fix. One question though -- I made those changes (just pushed them) and I'm still seeing a warning:
However, the (Note: your point number 4 used |
Well, look like using
I've downgraded your example back to According to this test - https://github.com/facebook/react/pull/16945/files#diff-ab371863932cd2e8f0ba14ff2eaab380R687 all you have to do (and it will fix the problem, I've tested) - remove |
Citing facebook/react#16945
Not very happy to discover this problem a year after it occurred (still on 16.9 on projects using Lazy). |
Just checked:
|
Hmm, I tried switching to Is there any reason to prefer the |
It all depends on the use case, but if you have more that one deferred component on the page - you might prefer |
I'm getting a white flicker that happens when
ReactDOM.hydrate
is called. I've tried my best to follow the documentation but I can't figure out how to fix it.I trimmed down my project to a simple repro which you can find here: https://github.com/thomasjm/ric-hydrate-flicker
Any help would be much appreciated :)
The text was updated successfully, but these errors were encountered: