useInterval JS useState React and Animation CSS I am changing text between two values using React useState and setInterval and it works fine.