-
Notifications
You must be signed in to change notification settings - Fork 190
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
Cannot read properties of null (reading 'children') - dynamicCSS.ts #603
Comments
Here are some downstream issues we've found on GH which appear relevant |
omfg. This issue has been plaguing me! It took me a while to realize it was happening down in rc-util. Thanks for filing this! An ~18 month old open PR doesn't feel particularly promising. Is there any way to get this merged? Also @josepdaniel have you found any workarounds? Edit: For now my solution is a monkeypatch:
|
After hydration mismatch, when the react tries to switch to client rendering, sometimes document is blank and accessing children causes entire app to break and can't be restored. A user needs to hard refresh the page to recover. |
Hi there, thank you for authoring these utilities.
We have run into a persistent problem when hydrating server-side-rendered react using cssinjs-based components (eg antd-v5) due to the following calls in
dynamicCSS.ts
.Where container is usually fetched from
When hydrating an SSR react app, if there is a mismatch between the client-render and server-render then the client will re-render the component. For frameworks like remix, where the whole document is rendered,
document.querySelector('head')
anddocument.body
may both be null at the time of rendering, leading to the following errorI believe the following PR, which has already been open for quite some time, will address the bug. So we would like to request considering it for merge. Thank you in advance!
#455
@zombieJ
The text was updated successfully, but these errors were encountered: