Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best way to show drawer on all screens #387

Open
mitesh-db opened this issue Aug 31, 2020 · 2 comments
Open

Best way to show drawer on all screens #387

mitesh-db opened this issue Aug 31, 2020 · 2 comments

Comments

@mitesh-db
Copy link

Hello, thank you for the awesome library.

I have no issue but I want to know that is there any great way to show same drawer on all screens?

For now, I'm using one drawer component for all screens.

@hanaechahid
Copy link

Hi @mitjnextt, I have the same issue, did you find a way to have an option to open an close the same drawer on many screens?

@RayyanNafees
Copy link

RayyanNafees commented Aug 17, 2021

According to me, the best way is to wrap the screen navigation component inside the drawer like so

const drawerRef= React.createRef()

<Drawer 
    ref={drawerRef}
    {...drawerProps} />

   <NavigationContainer>
        <Stack.Screen name="Home" component={Home} />
        ...
   </NavigationContainer>
</Drawer>
   

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants