title: What's the gain of hiding a Modal instead of unmounting it?
body: <p>The common example of modal usually goes like this:</p>
  <pre><code>import * as React from 'react';
  import { Modal, Portal, Text, Button, Provider } from 'react-native-paper';
  
  const MyComponent = () =&gt; {
    const [visible, setVisible] = React.useState(false);
  
    const showModal = () =&gt; setVisible(true);
    const hideModal = () =&gt; setVisible(false);
    const containerStyle = {backgroundColor: 'white', padding: 20};
  
    return (
      &lt;Provider&gt;
        &lt;Portal&gt;
          &lt;Modal visible={visible} onDismiss={hideModal} contentContainerStyle={containerStyle}&gt;
            &lt;Text&gt;Example Modal.  Click outside this area to dismiss.&lt;/Text&gt;
          &lt;/Modal&gt;
        &lt;/Portal&gt;
        &lt;Button style={{marginTop: 30}} onPress={showModal}&gt;
          Show
        &lt;/Button&gt;
      &lt;/Provider&gt;
    );
  };
  
  export default MyComponent;
  </code></pre>
  <p>My question is. Why is this the recommended usage instead of just unmounting the component when is not needed anymore? Something like this:</p>
  <pre><code>    visible &amp;&amp; (&lt;Modal visible={true} onDismiss={hideModal} contentContainerStyle={containerStyle}&gt;
        &lt;Text&gt;Example Modal.  Click outside this area to dismiss.&lt;/Text&gt;
      &lt;/Modal&gt;)
  </code></pre>
  <p>Is there any pro or cons of doing it one way or another? Is there a particular or good reason I have to do it in the first(&quot;official&quot;) way?</p>