Answer the question
In order to leave comments, you need to log in
Clustering markers on the server, react-leaflet?
Good afternoon! I beg you to help!
Please explain how to make the MarkerClusterGroup component for react-leaflet work with server side rendering ?
For the map itself I use react-leaflet-universal, but it doesn't work for clustering.
I try to do it like this
let MarkerClusterGroup;
...
componentDidMount() {
MarkerClusterGroup = require('react-leaflet-markerclusterr');
}
warning.js: 33 Warning: React.createElement: type is invalid - expected a string (for built-in components) or a class / function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports
. Answer the question
In order to leave comments, you need to log in
Check out these links:
https://github.com/YUzhva/react-leaflet-markerclus...
https://github.com/masotime/react-leaflet-universa...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question