React-Leaflet v2 changes the way that context is passed from the Map to other components, as described at https://react-leaflet.js.org/docs/en/context.html. This PR adds support for the new context mechanism, without removing support for earlier versions. It requires the user to slightly change the way in which they use the component if they are using React-Leaflet v2 (but does not require any changes for users of older versions). This is documented in a section added to the README. I think this would fix issue #1.
React-Leaflet v2 changes the way that context is passed from the
Map
to other components, as described at https://react-leaflet.js.org/docs/en/context.html. This PR adds support for the new context mechanism, without removing support for earlier versions. It requires the user to slightly change the way in which they use the component if they are using React-Leaflet v2 (but does not require any changes for users of older versions). This is documented in a section added to the README. I think this would fix issue #1.