title: What happens to State in parent when the child is unmounted
body: <p>In <code>props</code> I pass to the child State with Parent</p>
  
  <p>This solution is two-sided. A change in one of them causes a change in the other?</p>
  
  <p><strong>What happens to State in Parent when the child is unmounted?</strong></p>
  
  <p>When unmounting, State returns to initialization, i.e. to an empty list. Does it affect Parent?</p>
  
  <pre><code>function MyParentComponent(props) {
      const [info, setInfo] = useState([])
  
      useEffect(() =&gt; {
          // Set data to info
      }, [info]);
  
      return (
          &lt;View&gt;
              &lt;MyChild myInfo={info} /&gt;
          &lt;/View&gt;
      );
  };
  
  function MyChild(props) {
      const { myInfo } = props || {};
  
      const [info, setInfo] = useState([])
  
      useEffect(() =&gt; {
          // Set data to info
      }, [myInfo]);
  
      return (
          &lt;View&gt;
              &lt;View&gt;{info[0]}&lt;/View&gt;
          &lt;/View&gt;
      );
  };
  </code></pre>
  
  <p><strong>App.js</strong></p>
  
  <pre><code>function MainStackNavigator() {
    return (
      &lt;NavigationContainer&gt;
        &lt;Stack.Navigator&gt;
          &lt;Stack.Screen name='Main' component={Main} options={{ headerShown: false }} /&gt;
        &lt;/Stack.Navigator&gt;
      &lt;/NavigationContainer&gt;
    )
  }
  
  const App: () =&gt; React$Node = () =&gt; {
    return (
      &lt;MainStackNavigator /&gt;
    );
  };
  
  export default App;
  </code></pre>