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

Jump to specific scene and refresh it #2352

Closed
sy-tian opened this issue Sep 8, 2017 · 4 comments
Closed

Jump to specific scene and refresh it #2352

sy-tian opened this issue Sep 8, 2017 · 4 comments

Comments

@sy-tian
Copy link

sy-tian commented Sep 8, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v3.40.1 (v3 is not supported)
  • react-native v0.46.4

Expected behaviour

When I press button, What I expected to go to the specific page and refresh it.

When I use Actions.home({ type: ActionConst.RESET}), it actually go to the home page, but doesn't refresh.

When I use Actions.home({ type:ActionConst.REPLACE}), it go to the home page and refresh it. But When I trigger some actions to refresh the home page again, I will send multiple requests to the backend. I found the issue, it's caused by 'REPLACE', which will keep the old home component in the stack. When I refresh it, it will make all home components refreshed.

Can you help me how to resolve it? I want to go the home page and refresh it and keep only one home component in the stack.

Thanks,

@sy-tian
Copy link
Author

sy-tian commented Sep 8, 2017

Can anyone help me?

@rexlow
Copy link

rexlow commented Sep 8, 2017

I am having the same problem as well.
This is my current setup.

a -> b-> c -> d 

If I try to reset from d to a, it works but screen a would show a blank screen. Do note that this only happen to Android and this bug does not appear consistently.

@compojoom
Copy link
Contributor

try

Actions.home();
Actions.refresh({params})

@aksonov
Copy link
Owner

aksonov commented Sep 10, 2017

v3 is not supported anymore, sorry.

@aksonov aksonov closed this as completed Sep 10, 2017
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

4 participants