-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Displaying Multiple KMLs #34
Comments
Hi, Can you please add a codesandbox with the error? this is what I tried and it looks good: |
It might be an issue with other hooks and it's going to be hard to recreate the problem in Sandbox as I am having this issue in a fairly large app with many moving parts. It could be an issue elsewhere. I got this warning:
I also got this error for each KML I have loaded:
The issue occurs when I loaded 4 KMLs. Again, I suspect the issue lies elsewhere. I've been stumped on this issue for a while, so I apologize if this caused you to waste any time. |
Sorry to respond so late on this. Thank you for the codesandbox. I used it to recreate the error I was stuck on and eventually fixed. https://codesandbox.io/s/basic-usage-react-leaflet-v3-unique-key-g4w7p3?file=/src/index.tsx I had basically what this sandbox has, an array of KMLs stored with an What confused me was that the KMLs never changed, so the keys should stay the same with no problems, but that's not really the case. I'm not sure if this would be considered a bug, but I hope you found this useful. If it isn't, go ahead a close it. |
I am experiencing the same issue.
@lewdev your codesandbox code crashes when click add kml button FYI |
Yes, I am recreating the bug so the devs can see what's causing the issue. The problem isn't so much the devs fault, rather it's the new version of React where the Here's the fixed version of my "error recreated": On every render, a new unique key will be assigned to the
@pmrzygweb, I saw similar error messages as yours but I'm not sure if the new |
@lewdev I used only single item however this error happened, when I remove StrictMode, it seems to be rendering but layout is broken for me. |
I think you should at least show a snippet of code because it could simply not have to do with Have you read this stackoverflow Question? https://stackoverflow.com/questions/57397395/react-has-detected-a-change-in-the-order-of-hooks-but-hooks-seem-to-be-invoked
|
@pmrzygweb @lewdev Hi, I released a new version with the fix - version 2.1.1. |
@aviklai Does this library support latest node version? |
@pmrzygweb Hi, didn't check on node v18.12.1. |
Currently on:
When attempting to add multiple
<ReactLeafletKml>
components, the app crashes with this error:It seems to be an error with hooks within the ReactLeafletKml, but I could be wrong.
This worked previously on:
I don't really want to revert to an older version if possible.
The text was updated successfully, but these errors were encountered: