Presenting During Mount
Sometimes, you may want to present the sheet directly during mount. For example, you might want to present the sheet when a screen is opened through a deep link.
How?
You can do this by setting initialDetentIndex prop. It accepts the detent index that your sheet is configured with. See detents prop for more information.
const App = () => {
return (
<TrueSheet
detents={['auto', 0.69, 1]}
initialDetentIndex={1}
initialDetentAnimated
>
<View />
</TrueSheet>
)
}
Disabling Animation
You may want to disable the present animation. To do this, simply set initialDetentAnimated to false.
Using with React Navigation
Using this with react-navigation can cause render issue. Check out the troubleshooting guide for the fix 😉.