title: Component gets data from its parent or directly from Redux store
body: <p>I have the following component:</p>
  
  <pre class="lang-js prettyprint-override"><code>const CompA = () =&gt; {
    const user = useSelector(state =&gt; state.user);
    // ... the rest
  
    return (
      &lt;div&gt;
        &lt;CompB /&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>
  
  <p>This component uses the <code>user</code> data from <code>Redux</code> store. And I also have the <code>CompB</code> component that is a child of the <code>CompA</code> component, this component uses the <code>user</code> data from <code>Redux</code> store, too. There are two ways for the <code>CompB</code> to get the data:</p>
  
  <ul>
  <li>Gets the data from its parent through <code>props</code> or <code>context</code>.</li>
  <li>Gets the data directly from the <code>Redux</code> store by using <code>useSelector</code> hook (like its parent).</li>
  </ul>
  
  <p>I'm struggling to choose one from those approaches. Which one is better and why? Thank you.</p>