Portals trigger Suspense boundaries in SSR and only render on client

This commit is contained in:
Luna Ruan 2020-02-04 15:46:54 -08:00
parent 9b78e66d94
commit 628f6f50b5

View File

@ -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 ' +