DEV Community

Discussion on: How to create the base of a map with ReactJS, Leaflet and TypeScript

Collapse
 
vikinatora profile image
Viktor Todorov

Amazing article, it helped me a lot with starting my univeristy project using this exact stack!
I think one thing you have missed at the end of useAddMarker hooks is return { activate, setActivate } as I was getting error when trying to destructure the hook in the AddMarkerButton component.

Collapse
 
axelledrouge profile image
AxelleDRouge

You're welcome, happy to know it helped
oh yes probably, I created this article based on an app I created for my work, I simplified a lot, I may have deleted too much, or made mistakes in copying the function