lodev09 / react-native-true-sheet

The true native bottom sheet experience 💩
https://sheet.lodev09.com
MIT License
394 stars 12 forks source link

Stack Navigator Not Displaying in TrueSheet Component #46

Closed whynotly closed 2 months ago

whynotly commented 2 months ago

Description: When attempting to use a StackNavigator within the TrueSheet component, the sheet displays a white screen instead of the expected navigation content. This issue occurs on both iOS and Android platforms.

Steps to Reproduce:

Create a new React Native project. Install @lodev09/react-native-true-sheet and @react-navigation/stack. Set up a basic StackNavigator with a few screens. Include the StackNavigator inside the TrueSheet component. Present the TrueSheet. Expected Behavior: The StackNavigator should display its initial screen within the TrueSheet component.

Actual Behavior: The TrueSheet displays a white screen, and the StackNavigator content is not visible.

Example Code:

javascript Copy code import React, { useRef } from 'react'; import { View, Button } from 'react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import { TrueSheet } from '@lodev09/react-native-true-sheet';

const Stack = createStackNavigator();

const HomeScreen = ({ navigation }) => (

lodev09 commented 2 months ago

TrueSheet doesn't have first-class support for react-navigation, yet. As you mentioned, react-navigation has its own native implementation and doesn't play well with TrueSheet.

You can still use react-navigation with TrueSheet but it's not possible to contain the stack inside the sheet.