title: Access Value from React Hook from a function on another page
body: <p>I am trying to access a value found in a functional component from a function on another page</p>
  <p>This WhiteTimer.js functional component is running a timer</p>
  <pre><code>let interval = null;
  if (timerOn) {
    interval = setInterval(() =&gt; {
      setTime((prevTime) =&gt; prevTime - 10);
    }, 10);
  } else if (!timerOn) {
    clearInterval(interval);
  }
  return () =&gt; clearInterval(interval);
  }, [timerOn]);
  </code></pre>
  <p>which calls setTime and sets the hook</p>
  <pre><code>const [time, setTime] = useState(180000);
  </code></pre>
  <p>then on another page I have a function</p>
  <pre><code>async function updateGame(pendingPromotion, reset) {
  }
  </code></pre>
  <p>my aim is to get the value of const time value from whitetime.js  in to the update game function</p>
  <p>?</p>