Open bartsam opened 1 year ago
Same issue here, updated to the newest api version but MarkerClustererF is still not working in strict mode. Also nextJs app.
+1
Same issue. if I use MarkerClusterer I can see the Markers with MarkerF but the are not clustering, but if I use MarkerClustererF the Markers disappear.
A lot of things are broken with this module in strictmode, see also: https://github.com/JustFly1984/react-google-maps-api/issues/3095
The same here, sometimes, not always clustering isn't working at all or isn't working properly. Properties: next.js, strict mode dynamic data for markers
Running into the same issue with the same code as OP in Next 13 & React 18 Strict. The Clusterer class can be accessed in the callback for onLoad, it has the full array of markers to cluster but will not display them.
reactStrictMode: false
Or you can also turn off strict mode for some pages (or rather turn it on where you want it)
https://nextjs.org/docs/api-reference/next.config.js/react-strict-mode https://beta.reactjs.org/reference/react/StrictMode#enabling-strict-mode-for-a-part-of-the-app
reactStrictMode: false
https://nextjs.org/docs/api-reference/next.config.js/react-strict-mode
Obviously OP knows how to disable strict mode they had to enable it to produce this problem in the first place
It not working in strict mode means it might break fully in future react versions and is a sign of underlying problems with the implementation
Plus this also applies to react strict mode outside of Next.js
Same issue +1
The render of
MarkerClustererF
isn't working properly with NextJs in strict mode. Sometime on rerender it appear until another render.I made an exemple on codesandbox with a basic config : https://codesandbox.io/p/sandbox/serene-liskov-nu89s8?selection=%5B%7B%22endColumn%2[…]rcquy%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D
Have you an idea of the problem ?