Skip to content
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

Concurrent rendering in React 18 crashes the map. #41

Closed
eatyourgreens opened this issue Jun 24, 2024 · 1 comment · Fixed by #42
Closed

Concurrent rendering in React 18 crashes the map. #41

eatyourgreens opened this issue Jun 24, 2024 · 1 comment · Fixed by #42

Comments

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Jun 24, 2024

The React 18 concurrent rendering API crashes React Map GL with a null reference error:

Error: Invalid type: 'container' must be a String or HTMLElement.

For the time being, the old reactDOM.render() still works (but generates console warnings that it's deprecated.)

This might be caused by rendering the map inside a <Suspense> boundary. I'm not sure.

@eatyourgreens
Copy link
Contributor Author

Rendering the base map layer outside of a suspense boundary may fix this. See #42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant