react-bounds
react-bounds copied to clipboard
Components render empty in Server Side Rendering
Is there any support for SSR? I noticed that when my server renders out components that are wrapped in a react-bounds component, that none of the html gets render on the Server Side generated code. Is that a known issue of this method?
Since this isn't supported, the workaround I came up with was when I'm returning a wrapped component, I check if I'm in the client or the server.
const ResponsiveBackgroundImage = typeof window !== "undefined" ?
widthProvider(BackgroundImage) :
BackgroundImage;
@casesandberg Wondering if this is on the radar to be supported? Thank you for putting out this library!