React-native-router-flux: onEnter and onExit callback

Created on 28 Nov 2017  路  6Comments  路  Source: aksonov/react-native-router-flux

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.23
  • react-native v0.50.2

I hope that after the page jumps, the current page will execute a function to show the current page entry, no matter which page comes in. If the current page left, I also hope to have a function to perform, whether it is to go to the page, and these functions should be in the specific component which calls rather than on the properties above Scene, as onEnter and onExit should be in component inside the back instead of in Scene.

Most helpful comment

Here is example working for me, write these methods in your react component.

static onEnter() {
  ...
}

static onExit() {
  ...
}

All 6 comments

Please check latest beta.27, now you can define onEnter, onExit methods as your react component methods.

@aksonov Example?

@aksonov would please tell how to do it?

Here is example working for me, write these methods in your react component.

static onEnter() {
  ...
}

static onExit() {
  ...
}

@shukerullah thanks but it seems that onEnter onExit is added to beta.27 but neither of them works even if i want to call them like this its not working

why this closed.....no one provide a working example for now :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GCour picture GCour  路  3Comments

rafaelcorreiapoli picture rafaelcorreiapoli  路  3Comments

willmcclellan picture willmcclellan  路  3Comments

YouYII picture YouYII  路  3Comments

llgoer picture llgoer  路  3Comments