[Beta] Add deps to useEffect example

This commit is contained in:
dan
2022-12-02 17:00:41 +00:00
committed by GitHub
parent 2128e1e7d2
commit b3b6eddea8

View File

@@ -117,7 +117,7 @@ function VideoPlayer({ src, isPlaying }) {
} else {
ref.current.pause();
}
});
}, [isPlaying]);
return <video ref={ref} src={src} loop playsInline />;
}