I have a video tag () in my webpage, and a \"play/pause\" button that when the user clicks on it, the video starts/stops playing . How can I do so in react if I\'m not allowed t
Updated example for React Function Components:
import React, { useRef} from 'react' function myComponent(props) { const vidRef = useRef(null); const handlePlayVideo = () => { vidRef.current.play(); } return ( ) }