-
-
Notifications
You must be signed in to change notification settings - Fork 98
Disable component for SSR #35
Comments
Looks like To use
By extending P.S: maybe try to ask |
another approach: theKashey/react-imported-component#47 (comment) |
@wmertens Do you have an example of leaflet working with react-imported-component? react-leaflet-universal isn't working with the google maps library |
@owlyowl I am not SSRing in this project, so no. I just pointed out the possibility. I'm also not using Google with leaflet. It should just work. |
I'm in situation where I need to render to null this component when
window
global is not present (because of SSR). I use this lib to avoid error in SSR node server --> https://github.com/masotime/react-leaflet-universalI've forked your repo to change
LayerGroup
import origin and added same logic of render present in react-leaflet-universal but I don't really understand the API. Indeed, an error is throw aboutthis.container.map
is undefined so I can't access to the container.Any clue for how to achieve this?
Here is my snippet:
The text was updated successfully, but these errors were encountered: