react-native-navigation的迁移库

Lifecycle.js 455B

12345678910111213141516171819202122
  1. export default class Lifecycle {
  2. constructor(store) {
  3. this.store = store;
  4. this.containerStart = this.containerStart.bind(this);
  5. this.containerStop = this.containerStop.bind(this);
  6. }
  7. containerStart(id) {
  8. const ref = this.store.getRefForId(id);
  9. if (ref && ref.onStart) {
  10. ref.onStart();
  11. }
  12. }
  13. containerStop(id) {
  14. const ref = this.store.getRefForId(id);
  15. if (ref && ref.onStop) {
  16. ref.onStop();
  17. }
  18. }
  19. }