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

Actions state inside Drawer #2280

Closed
pocesar opened this issue Aug 23, 2017 · 2 comments
Closed

Actions state inside Drawer #2280

pocesar opened this issue Aug 23, 2017 · 2 comments

Comments

@pocesar
Copy link

pocesar commented Aug 23, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta-18
  • react-native v0.47.2
class DrawerView extends React.Component {
  render() {
    return (
      <View><Text>{this.props.data /* is always empty */}</Text></View>
    )
  }
}
// ...
<Drawer contentComponent={DrawerView}>
  <Scene key="something" />
</Drawer>
<Scene initial key="something_else" onEnter={() => Actions.something({ data: { stuff: { one: 1, two: 2 } } }) } />

There are no this.props.data ever inside the Drawer, and activeItemKey shows "something"

@aksonov
Copy link
Owner

aksonov commented Aug 23, 2017

Passing props to drawer is not supported (by react-navigation) - you are calling "something" so you must check component defined by "something", not drawer.

@aksonov aksonov closed this as completed Aug 23, 2017
@pocesar
Copy link
Author

pocesar commented Aug 23, 2017

but how to create dynamic menus inside the drawer then?

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

2 participants