We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 046f451 commit 6cd478eCopy full SHA for 6cd478e
src/boot/StoreHydratedGate.js
@@ -14,13 +14,9 @@ type Props = $ReadOnly<{|
14
* Where we prevent everything from rendering while waiting for rehydration.
15
*/
16
export default function StoreHydratedGate(props: Props): Node {
17
- const isHydrated = useGlobalSelector(getIsHydrated);
18
-
19
const { children } = props;
20
21
- if (!isHydrated) {
22
- return <FullScreenLoading />;
23
- }
+ const isHydrated = useGlobalSelector(getIsHydrated);
24
25
- return children;
+ return isHydrated ? children : <FullScreenLoading />;
26
}
0 commit comments