Interface with the React Leaflet Map API with the useRef and useEffect React Hooks

InstructorColby Fayock

Share this video with your friends

Send Tweet

In this lesson, you will learn how to use React hooks to interface with the Leaflet Map API in React Leaflet. We'll connect a ref to our Map component using the useRef hook and then use the useEffect hook to access that ref, find our Map instance, and use it to fly to a new location.

More details on the Leaflet Map API