-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Issues/12615 #15473
Issues/12615 #15473
Conversation
ReactDOM: size: 0.0%, gzip: 0.0% Details of bundled changes.Comparing: 784ebd8...1f7ca39 react-dom
react-art
react-native-renderer
react-test-renderer
react-reconciler
Generated by 🚫 dangerJS |
I havent added test as of now, because I dont know how to. can anyone help?
|
more so my issue with creating test is that a document has been declared globaly |
Does it make sense to throw when trying to render a portal on the server or should they just be ignored instead? |
If they throw, then a component using portal can’t be server rendered - but if they’re ignored, then there’ll be a client-server dom mismatch on initial render. What would be ideal for me is if they’re ignored on the server for rendering, and rendered on the client but ignored for the purposes of the mismatch algorithm, if I’m understanding things correctly. |
My understanding is that hydration is the initial render on the client on top of the initial server render, and effectively that must not produce a dom diff (altho i think there’s some wiggle room in there to account for subtle html differences). Which means, that if something is rendered in hydration, that i suspect it needs to have also been rendered on the server - or, the diffing algorithm needs to special-case allowing it. |
@ljharb I agree with the latter, but is it worth it considering #13097 is open?
after this we loose the context of Portal, I think but I am not sure,
which does this
I am not sure though and I am sorry if this seems naive. |
I'm not really sure ¯\_(ツ)_/¯ but presumably the first one to land shouldn't presuppose the existence of the other :-) |
closing this, as I think this pull request is not important |
Before submitting a pull request, please make sure the following is done:
master
.yarn
in the repository root.yarn test
). Tip:yarn test --watch TestName
is helpful in development.yarn test-prod
to test in the production environment. It supports the same options asyarn test
.yarn debug-test --watch TestName
, openchrome://inspect
, and press "Inspect".yarn prettier
).yarn lint
). Tip:yarn linc
to only check changed files.yarn flow
).Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
For Issue: #12615