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

Drawer children is not defined #2011

Closed
MaxFrolov opened this issue Jul 11, 2017 · 6 comments
Closed

Drawer children is not defined #2011

MaxFrolov opened this issue Jul 11, 2017 · 6 comments

Comments

@MaxFrolov
Copy link

MaxFrolov commented Jul 11, 2017

Hey, guys, I was faced with the troubles with Drawer on v4 beta 7, Drawer children don't exist anymore like it was in v3 with state.children. For now this.props don't contain react children.
Here is my scenes structure:
https://pastebin.com/szy2bBHp

@aksonov
Copy link
Owner

aksonov commented Jul 11, 2017

@Venumteam Please check 'Breaking changes' section.

@quarryman
Copy link

@aksonov Are you referencing this change?

Container scenes (that has children) cannot have component (or it will be considered as child!). If you want to customize containers, use react navigation custom navigators and pass it as navigator prop.

@aksonov
Copy link
Owner

aksonov commented Jul 11, 2017

Yes

@quarryman
Copy link

quarryman commented Jul 11, 2017

@aksonov Is there a chance you guys will give an example of usage?

Given we have a structure

<Scene key='drawer' type={} component={NavigationDrawer} open={false}>
  <Scene />
  <Scene />
</Scene>

NavigationDrawer component was rendering children.
What must it render since new version?

@aksonov
Copy link
Owner

aksonov commented Jul 12, 2017

v4 uses built-in react navigation Drawer navigator. Please use contentComponent for SideMenu component, remove component attribute. Please check docs about DrawerNavigator from ReactNavigation.

@MaxFrolov
Copy link
Author

@aksonov aksonov closed this as completed Jul 12, 2017
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