-
Notifications
You must be signed in to change notification settings - Fork 898
React Leaflet v3 #698
Description
An early (alpha) version of React Leaflet v3 is available on npm using the next tag: yarn add react-leaflet@next.
There is still lots to do in terms of testing and documentation but this first version is working so far to run the basic examples.
Among the major changes are:
- Full rewrite based on React Hooks (no more extending
Component) - Replace Flow by TypeScript for type checking
- Drop IE support (Babel config will only target the "last 2 versions" of browsers)
- Switch to the Hippocratic License
- The
Mapcomponent is replaced byMapContainer, behaving differently - Event handlers must be attached using the
eventHandlers proprather thanon*props, with a similar change for path options and WMS params - The
react-leafletpackage only exposes a public API while a new package,@react-leaflet/core, is used to provide the core APIs - A new documentation website using Docusaurus v2 with live examples, currently published on react-leaflet-v3.now.sh
During the alpha versions cycle there is likely to be breaking changes between releases, these versions are only meant to be used by early adopters and contributors who want to help identify and fix bugs.
If you want to help with this release please try to convert components using v2 APIs to v3 and open issues for bugs or use cases that can't be implemented.
Please keep in mind the breaking changes from v2 are intentional for better stability and compatibility with React or Leaflet, so things that may work in a certain way in v2 do not necessarily work the same way in v3.
Thanks!