Skip to content

fix: #891, #883, #882, #881, and issue when building component libraries for react-leaflet (#897) #896

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

Conversation

miccoh1994
Copy link

@miccoh1994 miccoh1994 commented Jul 6, 2021

Fixes Issues:

Also fixes an issue when using/developing components from external packages by requiring '@react-leaflet/core' as a peer dependecy:

No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>

Since @react-leaflet/core, and consequently useLeafletContext, are bundled with react-leaflet, components created with core do not have access to the same context as the MapContainer. This is only achievable by excluding @react-leafler/core from the bundle of react-leaflet.

@miccoh1994 miccoh1994 changed the title fix: #891, #883, #882, #881 fix: #891, #883, #882, #881, and issue when building component library's for react-leaflet. Jul 6, 2021
@miccoh1994 miccoh1994 changed the title fix: #891, #883, #882, #881, and issue when building component library's for react-leaflet. fix: #891, #883, #882, #881, and issue when building component libraries for react-leaflet. Jul 6, 2021
@miccoh1994 miccoh1994 changed the title fix: #891, #883, #882, #881, and issue when building component libraries for react-leaflet. fix: #891, #883, #882, #881, and issue when building component libraries for react-leaflet (#897) Jul 6, 2021
@miccoh1994
Copy link
Author

Using the single fix in #885

eapearson added a commit to kbaseincubator/react-leaflet that referenced this pull request Jul 9, 2021
@PaulLeCam
Copy link
Owner

Thanks but the core package is a direct dependency, not a peer one.

@PaulLeCam PaulLeCam closed this Oct 9, 2021
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 this pull request may close these issues.

3 participants