This function works fine when called within App.js, but the issue lies when I attempt to change the snap of the BottomSheet in the App.js file from an outside component. This component is in the form of a Tab (using React Navigation) that is referenced within App.js. The BottomSheet is placed in the App.js file so that it draws over the tab navigation bar and the problem I am facing is changing the position of the App.js BottomSheet through the pressing of a button in a separate component.
I have my BottomSheet component placed within my main
App.js
file as should below:With the function to change where it snaps provided above within
App.js
:This function works fine when called within
App.js
, but the issue lies when I attempt to change the snap of the BottomSheet in theApp.js
file from an outside component. This component is in the form of a Tab (using React Navigation) that is referenced withinApp.js
. The BottomSheet is placed in theApp.js
file so that it draws over the tab navigation bar and the problem I am facing is changing the position of theApp.js
BottomSheet through the pressing of a button in a separate component.