diff --git a/docs/api-reference/map.md b/docs/api-reference/map.md index 0ad33c01f..bbd99c477 100644 --- a/docs/api-reference/map.md +++ b/docs/api-reference/map.md @@ -577,7 +577,7 @@ import Map from 'react-map-gl'; import type {MapRef} from 'react-map-gl'; function App() { - const mapRef = useRef(); + const mapRef = useRef(null); const onMapLoad = useCallback(() => { mapRef.current.on('move', () => {