- Use a useEffect to sync the ref with your state. - Set up your interval with an empty dependency array so it runs only once. - Access the ref inside the interval callback. This approach decouples ...