react-lazy-hydration-render
react-lazy-hydration-render copied to clipboard
Use cloneElement or children when hydrating
It would be nice to have the following functionality, providing no additional DOM elements when hydrating. Not sure if its possible but thought id ask.
if (isVisible || mode === 'static') {
return <Fragment>{children}</Fragment>
}
I think is not possible because you don't create additional DOM element and react break html. But i will try this example.
Now, you could use
const Header = () => (
<LazyRender wrapper={React.Fragment}>
<HeavyHeader />
</LazyRender>
);