Hi I'm new with react-leaflet, I'm working on typescript and everything I tried seems to fail, the documentation is not clear about working with typescript, despite of the fact that the library seems to be coded in ts. I'll apreciate if someone could help me to get it working with typescript. Tnx in advance!


Same here
React Leaflet provides type definitions directly in the installed package but Leaflet does not, you need to install them as needed: yarn add -D @types/leaflet.
Sorry, another question, how can I define event hendlers on the components?
eg:

React Leaflet provides type definitions directly in the installed package but Leaflet does not, you need to install them as needed:
yarn add -D @types/leaflet.
Tnx @PaulLeCam it worked!
It might be worth adding some clarification in the documentation on installing with typescript. I would add a PR to the readme but the documentation is separate. Greetings from Argentina and thanks for the quick response!
Yes I added a section to the installation docs: https://react-leaflet.js.org/docs/start-installation#using-typescript
Most helpful comment
Yes I added a section to the installation docs: https://react-leaflet.js.org/docs/start-installation#using-typescript