question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Actions.pop(refresh: { }) cannot trigger componentWillReceiveProps at children scene

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
ganchengcommented, Nov 29, 2018

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

1reaction
yrjwcharmcommented, Nov 10, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Actions.pop(refresh: { }) cannot trigger ... - GitHub
Actions.pop(refresh: { }) would trigger componentWillReceiveProps at parent scene but not children scene. Since my tab view is put under ...
Read more >
react-native-router-flux : No React lifecycle method is getting ...
pop() is called with no arguments. In order to refresh Page 1, you need to override the functionality of your back button and...
Read more >
Source - GitHub
Scenename cause render multiple time and cause getWrappedInstance return ... Actions.pop\(refresh: { }\) cannot trigger componentWillReceiveProps at ...
Read more >
react-native-router-flux/CHANGELOG.md - UNPKG
465, - problem with Actions.pop ,, send me to initial Scene ... 1249, - Actions.pop\(refresh: { }\) cannot trigger componentWillReceiveProps at children ......
Read more >
react-native-router-flux - npm
go back (i.e. pop the current screen off the nav stack). Actions.pop(). // refresh the current Scene with the specified props.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found