This documentation assumes you are already familiar with Leaflet. React Leaflet does not replace Leaflet, it only provides bindings between React and Leaflet.
This documentation is not a replacement for Leaflet's documentation, it only focuses on aspects specific to React Leaflet.
Read this before going further
Before using React Leaflet, you must setup your project following Leaflet's Quick Start Guide.
Adding React Leaflet
React, React DOM and Leaflet are required peer dependencies. You must add them to your project if they are not already installed:
Then you can install React Leaflet:
React Leaflet provides TypeScript definitions in the installed packages, but needs Leaflet's definitions to be present. If you have not installed them yet, you will need to add them: