Skip to content

Update dependency react-leaflet to v4

Renovate Bot requested to merge renovate/react-leaflet-4.x into master

This MR contains the following updates:

Package Type Update Change
react-leaflet (source) dependencies major ^2.8.0 -> ^4.0.0

Release Notes

PaulLeCam/react-leaflet (react-leaflet)

v4.2.1

Compare Source

Fixed bounds update in ImageOverlay (MR #​1063 by hwonyo)

v4.2.0

Compare Source

Added support for mutable url prop on TileLayer (MR #​1047 by goto-bus-stop)

v4.1.0

Compare Source

  • Updated Leaflet dependency to v1.9.
  • Fixed eventHandlers object being injected in WMS request URL.
  • Added support for dynamic bounds props on ImageOverlay.

v4.0.2

Compare Source

v4.0.1

Compare Source

Fix calling map.remove() on MapContainer unmounting.

v4.0.0

Compare Source

Changes from v3:

Breaking changes
  • React v18 and Leaflet v1.8 are now required as peer dependency.
  • ES2020 is the new compilation target version.
  • Removed useMapElement hook.
  • Removed MapConsumer component.
  • Removed whenCreated property from the MapContainer component (a ref callback can be used instead).
  • Removed onOpen and onClose properties from Popup and Tooltip components.
  • Removed CommonJS distribution.
  • Removed UMD distribution.
Other changes
  • Added support for React v18 (concurrent mode).
  • Added support for ref in the MapContainer and Pane components.
  • Added createLeafletContext function to core.
  • The created element and context objects are now frozen (immutable).

v3.2.5

Compare Source

Fix supporting mutable whenCreated with unmounting MapContainer.

v3.2.4

Compare Source

Fix removing the map handlers when MapContainer is unmounted.

v3.2.3

Compare Source

v3.2.2

Compare Source

Fix layer unmount (MR #​916 by piitaya).

v3.2.1

Compare Source

  • Fix Popup unmounting logic to unbind from container.
  • Fix links to point to Leaflet 1.7.1 docs (MR #​889 by zerekw).

v3.2.0

Compare Source

  • Change unmounting logic for some layers, which should fix issues related to removing or updating elements.
  • Make the style prop of GeoJSON mutable, this prop should be used instead of pathOptions (pathOptions can still be used but should be considered deprecated).
  • Fix documentation about bounds prop being an instance of LatLngBounds.

v3.1.0

Compare Source

v3.0.5

Compare Source

Use useState hook rather than useMemo to store immutable values in MapContainer and Pane.

v3.0.4: v3.0.3/3.0.4

  • Document pathOptions for GeoJSON (MR #​785 by bb)
  • Ensure MapContainer props are immutable
  • Fix TypeScript definition for MapContainer props
  • Update README

v3.0.2

Compare Source

Additional fixes for panes support

v3.0.1

Compare Source

v3.0.0

Compare Source

v3 is a full rewrite of React Leaflet and contains breaking change from v2.

  • 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 modern browsers)
  • Switch to the Hippocratic License
  • The Map component is replaced by MapContainer, behaving differently
  • Event handlers must be attached using the eventHandlers prop rather than on* props, with a similar change for path options and WMS params
  • The react-leaflet package 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

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Edited by Renovate Bot

Merge request reports