-
Notifications
You must be signed in to change notification settings - Fork 0
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
Suspending the MapViewContent
component will crash the map with React 18
#61
Comments
Moving to React 18 in general would be desirable, however at this point this has been held back by the dependencies of If we managed to replace this by However, there has been an issue with react-map-gl + deck.gl + react 18 that hasn't been resolved in a long time (something to do with 18's batching of updates and its impact on map interactivity) - we'd have to check if this appears when updating. |
I haven't seen any problems on https://jamaica.infrastructureresilience.org, since moving that code to React 18 in June. |
That's great to hear! I was under the impression that I did run into some issues when trying to update it, but that was long ago so a lot could have changed. Hopefully it will be safe to update for this project, too (after implementing the fix you mention above) |
I have run into a bug, but only in production, where Recoil's
|
irv-frontend/src/map/MapView.tsx
Lines 26 to 44 in e32a9ba
Heads up that the Recoil state here works fine with React 17, but crashes with the new
createRoot(node).render()
in React 18. Moving the Recoil state down into individual components fixes it. I think that the React Map GLMap
component crashes if it renders while suspended, but only with the new concurrent rendering API.See also:
The text was updated successfully, but these errors were encountered: