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

react-native-drawer example with react-native-router-flux 4 #2133

Closed
vijaychouhan-rails opened this issue Jul 28, 2017 · 11 comments
Closed

react-native-drawer example with react-native-router-flux 4 #2133

vijaychouhan-rails opened this issue Jul 28, 2017 · 11 comments

Comments

@vijaychouhan-rails
Copy link

Can you please provide me an example of react-native-drawer with react-native-router-flux 4

@aksonov
Copy link
Owner

aksonov commented Jul 28, 2017

v4 uses built-in react-navigation drawer.

@aksonov aksonov closed this as completed Jul 28, 2017
@vijaychouhan-rails
Copy link
Author

@aksonov

I know but I want to use react-native-drawer because I need to use displace screen feature but in-build drawer does not provide this.

@aksonov aksonov reopened this Jul 31, 2017
@aksonov
Copy link
Owner

aksonov commented Jul 31, 2017

Try new overlay and contentComponent props (not documented, PR will be useful):

<Scene overlay contentComponent=`CustomDrawer`>
   <Scene>...</Scene>
   <Scene>...</Scene>
   <Scene>...</Scene>
</Scene>

Within CustomDrawer you define your drawer. The question is how to call drawer open/close... We need to think about it, but try this first.

@aksonov aksonov closed this as completed Aug 1, 2017
@raynor85
Copy link
Contributor

raynor85 commented Aug 4, 2017

I have successfully implemented it. The CustomDrawer must specify this.props.children in the render function in order to display its nested Scenes. The only problem I am experiencing now is removing the animation transitions. In my implementation, using type="reset" to <Scene overlay contentComponent=CustomDrawer> avoid the initial transition. Maybe the approach mentioned here could be useful to get rid of unwanted animated transitions.
#2062

@themakerman
Copy link

@raynor85 What does overlaycontentComponent prop does to the Scene?

@foyarash
Copy link

Hello,

I don't receive the children in the props, how can I retrieve them?

@raynor85
Copy link
Contributor

@foyarash, maybe this is related to #2496
Try the version beta.17, since the overlay seems to be removed in beta.18, and let me know

@raynor85
Copy link
Contributor

@themakerman it is just a wrapper used to add a component in the top of the app

@foyarash
Copy link

OverlayNavigator is actually present in beta.22

@raynor85
Copy link
Contributor

raynor85 commented Nov 2, 2017

@foyarash OverlayNavigator is indeed present in beta.22, but no longer accept contentComponent as a prop. My pr #2578 solves that.

@mightym
Copy link

mightym commented Jan 15, 2018

How do I receive the the children there?

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

6 participants