We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08aa209 commit 0ec92c4Copy full SHA for 0ec92c4
src/withAsyncComponents.js
@@ -53,6 +53,7 @@ export default function withAsyncComponents(app : React$Element) {
53
if (!rehydrateState.resolved[id]) {
54
return false;
55
}
56
+ rehydrateState[id] = false;
57
} else if (defer) {
58
// Deferred, so return false to stop walking down this branch.
59
@@ -79,6 +80,8 @@ export default function withAsyncComponents(app : React$Element) {
79
80
return doWalk(appWithAsyncComponents, {}, true)
81
// Swallow errors.
82
.catch(() => undefined)
83
+ // Ensure that state rehydration is killed
84
+ .then(() => { if (typeof window === 'object') { window[STATE_IDENTIFIER] = null; } })
85
.then(() => ({
86
appWithAsyncComponents,
87
state: { resolved: execContext.getResolved() },
0 commit comments