1. 26
    Access a Leaflet Map instance with useRef Hook in React Leaflet
    18s

Access a Leaflet Map instance with useRef Hook in React Leaflet

Share this video with your friends

Send Tweet

In order to access our Map instance, we need to use React's ref functionality. We'll start with React's useRef hook and use it to apply a ref to our map.

Click here for exercise instructions