I have a big code that I shrank to this small one -
foo.js:
import React, { useEffect, useRef, useState } from "react"; const Foo = () =>