React-native-router-flux: Actions.pop(refresh: { }) cannot trigger componentWillReceiveProps at children scene

Created on 5 Nov 2018  ·  7Comments  ·  Source: aksonov/react-native-router-flux

Version


"react-native-router-flux": "4.0.5",
"react-native": "^0.56.0",
"react": "^16.4.1"

Expected behaviour

Actions.pop({refresh:{}}) would trigger componentWillReceiveProps at Drawer scene
The children scene should also trigger componentWillReceiveProps.

Actual behaviour

Actions.pop({refresh:{}}) would trigger componentWillReceiveProps at Drawer scene but not children scene.

Steps to reproduce

  1. Wrap scenes in parent scene or Drawer.
  2. Use Actions.sceneKey to go from one scene to another.
  3. Use Actions.pop({refresh:{}});
  4. View returns to previous scene. componentWillReceiveProps() calls on Drawer, but not calls on children scene.

Reproducible Demo

Most helpful comment

Actions.pop({refresh: {}, timeout: 1})

All 7 comments

可以 加个时间戳 Actions.pop({refresh:{date:new Date()}); 就可解决。

Sorry, it is not supported right now. Feel free to submit PR

@aksonov what is PR?

可以 加个时间戳 Actions.pop({refresh:{date:new Date()}); 就可解决。

are you sure?

Actions.pop({refresh: {}, timeout: 1})

Actions.pop({refresh: {}, timeout: 1})

this stops the app for 1 second so you really can't click or do anything

@RukaiJohn It appears that time unit is not second. I tried, can solve my problem, and quite quick.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moaxaca picture moaxaca  ·  3Comments

xnog picture xnog  ·  3Comments

basdvries picture basdvries  ·  3Comments

willmcclellan picture willmcclellan  ·  3Comments

tonypeng picture tonypeng  ·  3Comments