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

Incompatible with react-leaflet v3 #109

Open
victorlin opened this issue Aug 23, 2021 · 3 comments
Open

Incompatible with react-leaflet v3 #109

victorlin opened this issue Aug 23, 2021 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@victorlin
Copy link

Runtime error:

useLeafletMap.js:10 Uncaught TypeError: (0 , _reactLeaflet.useLeaflet) is not a function
at useLeafletMap (useLeafletMap.js:10)
...

According to this migration guide:

No more useLeaflet hook or withLeaflet HOC. It’s been replaced with useMap instead

Downgrading to react-leaflet v2 fixes the issue. However, v2 is no longer maintained.

Related: PaulLeCam/react-leaflet#783

@hugobarragon
Copy link

I think it does not make sense any more on v3 because o offical support
https://react-leaflet.js.org/docs/api-map/#usemap

@vadzim
Copy link
Owner

vadzim commented Nov 28, 2021

I think it does not make sense any more on v3 because o offical support https://react-leaflet.js.org/docs/api-map/#usemap

v2 also have a hook. useLeaflet has some other hooks, so for me it still makes sense))

@hugobarragon
Copy link

yes, thats true @vadzim I this lib has other useful hooks, on our case that we only need the useMap, that react-leaflet has it too maybe it is not needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants