title: useState vs. useEffect - setting initial value
body: <p>I have two basic questions about React:</p>
  <ol>
  <li>In order to assign an initial empty value to a piece of state (let's say <code>player</code>) in a functional component, are the following two approaches the same or are they different in some way?</li>
  </ol>
  <h3>Approach A:</h3>
  <pre><code>const [player, setPlayer] = useState({})
  </code></pre>
  <h3>Approach B:</h3>
  <pre><code>useEffect(() =&gt; {
      setPlayer({})
  }, []);
  </code></pre>
  <ol start="2">
  <li>When I browse to a <code>player</code>, the page is eventually updated with values coming from the global store so I need to avoid showing the values of the previous player while the current one is still loading. What is the best way to go about this?</li>
  </ol>
  <hr />
  <p>Please let me know if you need more background information in order to help. <br>
  Thank you in advance!</p>