diff --git a/docs/api-reference/components/info-window.md b/docs/api-reference/components/info-window.md index d502c26..c798c86 100644 --- a/docs/api-reference/components/info-window.md +++ b/docs/api-reference/components/info-window.md @@ -69,11 +69,12 @@ const MarkerWithInfoWindow = ({position}) => { // clicking the marker will toggle the infowindow const handleMarkerClick = useCallback(() => - setInfoWindowShown(isShown => !isShown) + setInfoWindowShown(isShown => !isShown), + [] ); // if the maps api closes the infowindow, we have to synchronize our state - const handleClose = useCallback(() => setInfoWindowShown(false)); + const handleClose = useCallback(() => setInfoWindowShown(false), []); return ( <>