title: How to fetch data only once and never again in reacthooks and redux
body: <p>Please how do you I fetch data only once and never again when moving forth and back in react components using React Hooks. I simply want it on such a way that once the data is fetched for the first time in the component, it should not fetch again. Using an empty array [ ] in react hooks will make the component to fetch data once every single time we move to the component again.
  This is a sample code used in reacthooks to fetch the data only once.
  I simply want to fetch the data once and not again even when transitioning from page/component to component.
  This two links only fetch data once when navigating between pages. Thanks and hope to hear from you all
  <a href="http://www.favesound.de/" rel="nofollow noreferrer">http://www.favesound.de/</a>
  <a href="http://soundredux.io/" rel="nofollow noreferrer">http://soundredux.io/</a></p>
  <pre><code>useEffect(() =&gt; {
  const fetchData = async () =&gt; {
  const result = await axios(url);
  setData(result.data);
  };
  fetchData();
  }, [url]);
  </code></pre>