mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 00:20:04 +01:00
Portals trigger Suspense boundaries in SSR and only render on client
This commit is contained in:
parent
9b78e66d94
commit
628f6f50b5
|
|
@ -908,7 +908,6 @@ class ReactDOMServerRenderer {
|
|||
if (err === REACT_PORTAL_TYPE) {
|
||||
invariant(
|
||||
this.suspenseDepth > 0,
|
||||
// TODO: include component name. This is a bit tricky with current factoring.
|
||||
'Portals must have a fallback UI when being rendered on the server.\n' +
|
||||
'\n' +
|
||||
'Add a <Suspense fallback=...> component higher in the tree to ' +
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user