title: How to access bottomSheet ref from another component using forwardRef?
body: <p>I have a bottom sheet that appears in different screens based on pressing buttons that's why I need to store the bottom sheet in a separate component so I can call it on different screens.
  for more illustration say I have a home screen with an add button on clicking that button, I need to view the bottom sheet. After searching I found a way to do so by forwardRef as explained in the next code but the problem is with <code>onPress={() =&gt; sheetRef.current.snapTo(0)}</code> the bottomsheet doesn't appear.
  Please feel free to suggest a better way to handle this situation or tell me what's wrong with it, Thanks!</p>
  <pre><code>import { BottomSheets } from &quot;../components/BottomSheets&quot;;
  export default function HomeScreen() {
   const sheetRef = React.createRef&lt;any&gt;();
  .
  .
  return(
   &lt;View&gt;
  .
  .
     &lt;BottomSheets ref={sheetRef} /&gt;
     &lt;TouchableOpacity style={{ marginTop: 4 }} onPress={() =&gt; 
         sheetRef.current.snapTo(0)}&gt;
        &lt;Text&gt;Add&lt;/Text&gt;
      &lt;/TouchableOpacity&gt;
  .
  .
   &lt;/View&gt;
  }
  </code></pre>
  <p>and the bottomSheet component</p>
  <pre><code>export const BottomSheets = React.forwardRef((props, ref: any) =&gt; {
  const createRef = React.createRef&lt;any&gt;();
  const renderContent = () =&gt; ()
  const renderCreateContent = () =&gt; ()
  .
  .
  return (
      &lt;View&gt;
        &lt;BottomSheet
          ref={ref}
          snapPoints={[220, 0]}
          renderContent={renderContent}
          initialSnap={1}
          enabledGestureInteraction={true}
          borderRadius={20}
        /&gt;
        &lt;BottomSheet
          ref={createRef}
          snapPoints={[650, 0]}
          renderContent={renderCreateContent}
          renderHeader={renderHeader}
          initialSnap={1}
          enabledGestureInteraction={true}
          enabledContentTapInteraction={false}
          enabledBottomInitialAnimation={true}
        /&gt;
      &lt;/View&gt;
    );
  });
  </code></pre>