diff --git a/docs/snippets/hover-video.jsx b/docs/snippets/hover-video.jsx new file mode 100644 index 000000000..a52660c91 --- /dev/null +++ b/docs/snippets/hover-video.jsx @@ -0,0 +1,62 @@ +export const HoverVideo = ({ src, poster, className }) => { + const videoRef = useRef(null); + const [muted, setMuted] = useState(true); + + // Lazy initializer, not a post-mount effect: with useState(false) the first + // committed render would emit `