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

Unable to Hook Into drawerClose Event #3121

Closed
smilingkylan opened this issue Jul 11, 2018 · 1 comment
Closed

Unable to Hook Into drawerClose Event #3121

smilingkylan opened this issue Jul 11, 2018 · 1 comment

Comments

@smilingkylan
Copy link

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.28
  • react-native v0.51.0

Expected behaviour

Howdy, we are using react-native-router-flux's component as our sidebar and we have some items in the sidebar that have Redux state. While apparently you can call drawerClose and drawerOpen, there is not an actual event (eg onDrawerClose) which we can hook into in order to reset the sidebar's Redux state. We want it reset so that when they re-open it the user will see a fresh sidebar (ie no persistence)

Actual behaviour

No callback / event to hook into for the closing of the drawer (eg if someone swipes it closed).

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.

  1. Open sidebar / drawer
  2. Close sidebar / drawer... there is no callback or event into which you can hook and attach on additional function calls

Any help would be appreciated. Thank you.

@aksonov
Copy link
Owner

aksonov commented Aug 8, 2018

With latest version you can see this for Example project:

2018-08-08 16:44:08.796 [info][tid:com.facebook.react.JavaScript] 'reducer: ACTION:', { type: 'Navigation/DRAWER_CLOSED', key: 'id-1533739425368-12' }

@aksonov aksonov closed this as completed Aug 8, 2018
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