Closed mvsmal closed 2 years ago
Ah, you're probably right. I guess I was thinking that usually you want to trigger lazy after a user interaction not on the first render. But now that you mention it, it's true there may be situations in SSR when you want to render the contents of Lazy.
It should be fine to change it as you say. Do you want to send PR? (I can also make the change myself as it's an easy one.)
The code below has a comment saying that
React.lazy
doesn't support SSR, thusFunctionComponent.Lazy
result in an emptydiv
on server side. Is there any reason you don't just return thef
function directly instead?https://github.com/fable-compiler/fable-react/blob/master/src/Fable.React.FunctionComponent.fs#L36-L55