Fixes issue with Map Container is already initialized#1073
Fixes issue with Map Container is already initialized#1073mistenkt wants to merge 1 commit intoPaulLeCam:masterfrom
Conversation
|
Any updates here? 👀 |
|
Hi, any update on this PR?😎 |
|
Until this is merged and a new release is created, you can use my branch by adding the following in your package.json
we've been using it in prod for a few months now without any issues. |
Thank you! It works very well for me! |
|
We are also facing this issue, which is breaking hot reloads on our pages that have maps on them. |
|
This fixed the issue for us as well. If we can do anything to help get this PR merged into the new release, let us know. Much appreciated. |
|
This change didn't fix the issue for me, but another small tweak did. Although I am pretty sure it is a crude symptomatic solution and not a proper fix, thus no PR. But I basically just ensured (Next.js 15.0.2, React 18.3.1) |
Was running into this error quite frequently when using this library on a
Nextproject where our maps were being loaded usingnext/dynamicto prevent SSR.Previous suggestions about adding keys to the
MapContainercomponent were not working.Noticed that the code for checking if we have an existin context is not actually updated if/when the context changes, and instead explicitly ignoring the lint warnings for this.
// eslint-disable-next-line react-hooks/exhaustive-deps.This fixes the problem.
Related issue: #1069