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

Cannot send param hen navigating from Drawer to Stack #5952

Closed
mharrisweb opened this issue May 30, 2019 · 3 comments
Closed

Cannot send param hen navigating from Drawer to Stack #5952

mharrisweb opened this issue May 30, 2019 · 3 comments

Comments

@mharrisweb
Copy link

Current Behavior

I get undefined params when using:

     <Text
              onPress={() => {
                this.props.navigation.navigate("VideoPlayer", { video: video });
              }}
              style={styles.text}
            >

I get undefined in my component when I try and get param:

this.props.navigation.state.params.video

How to reproduce

https://snack.expo.io/@mharrisweb/insane-cake

Your Environment

software version
react-navigation 3.0.9
react-native 0.57.1
node 10.15.3
npm or yarn 6.9.0
@SourceCipher
Copy link

I am having an issue trying to pass param from the store to the auth screen. It always returns undefined..

@mptorz
Copy link

mptorz commented Jun 10, 2019

I have the same issue. getParams always returns undefined when navigating from drawer content component to any stack.

@brentvatne
Copy link
Member

you can pass params to the screen you're actually going to, not the navigator that contains that screen.

related:

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

4 participants