Skip to content

Best way to show drawer on all screens #387

Open

Description

@mitesh-db

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.

Activity

  1. hanaechahid commented on Feb 14, 2021

    @hanaechahid

    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?

  2. RayyanNafees commented on Aug 17, 2021

    @RayyanNafees

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions