mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 03:42:14 +00:00
[Beta] Add deps to useEffect example
This commit is contained in:
@@ -117,7 +117,7 @@ function VideoPlayer({ src, isPlaying }) {
|
||||
} else {
|
||||
ref.current.pause();
|
||||
}
|
||||
});
|
||||
}, [isPlaying]);
|
||||
|
||||
return <video ref={ref} src={src} loop playsInline />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user