Course lesson

Access a Leaflet Map instance with useRef Hook in React Leaflet

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.

Duration
0 min
Access
Pro
Transcript
Available

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