title: window.addEventListener('load', function) not working in react(gatsby)
body: <p>I'm struggling with stucking scroll parallax when page initial scroll is not at the top on load. Im using react-scroll-parallax library (<a href="https://www.npmjs.com/package/react-scroll-parallax" rel="nofollow noreferrer">https://www.npmjs.com/package/react-scroll-parallax</a>).
  To fix my problem i'm trying to use their suggestion from here <a href="https://www.npmjs.com/package/react-scroll-parallax#example-usage-of-context" rel="nofollow noreferrer">https://www.npmjs.com/package/react-scroll-parallax#example-usage-of-context</a>.</p>
  
  <pre><code>import { useEffect } from 'react';
  import { useController } from 'react-scroll-parallax';
  
  const ParallaxCache = () =&gt; {
    const { parallaxController } = useController();
    useEffect(() =&gt; {
      const handler = () =&gt; {
        parallaxController.update();
        console.log(1);
      };
      window.addEventListener('load', handler);
      return () =&gt; document.removeEventListener('load', handler);
    }, [parallaxController]);
  
    return null;
  };
  
  export default ParallaxCache;
  </code></pre>
  
  <p>I put ParallaxCache component at top of my app(page actually, cause its gatsby).</p>
  
  <p>But the 'load' event doesnt seems to work. I've also tried 'DOMContentLoaded' but with the same result. However other event like for example 'scroll' or 'resize' works properly and my controller updates. Am I missing something or react prevents from using this events?</p>