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.

Stack of same scene not working anymore after update from 4.0.0-beta-28 to 4.0.1

See original GitHub issue

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.1
  • react-native v0.55.4

Expected behaviour

Having some scenes like:

<Scene key="articles">
    <Scene
      key="home"
      component={ChannelsScreen}
      sceneStyle={styles.screen}
      renderRightButton={<ProfileIcon />}
      onRight={() => {}}
    />

    <Scene
      key="article"
      component={ArticleContainer}
      title={I18n.t('back').toUpperCase()}
      sceneStyle={styles.screen}
      leftButtonIconStyle={styles.goBackImageStyle}
      hideDrawerButton
      tintColor={styleConstants.colorBlack}
      onLeft={() => Actions.pop()}
      leftButtonImage={backButtonLeftArrowImage}
      renderRightButton={() => <View />}
    />
 </Scene>

when calling Actions.push('article', newParams }); multiple times, a new article screen should be opened on top of the oldest one increasing the stack items.

Actual behaviour

old article screen is replaced with a new one

This used to work in 4.0.0-beta-28

I tried to put Scene key article inside a stack or even transform articles one from scene to Stack but that doesn’t seem to work.

Is there any possibility in 4.0.1 to create a stack of same scenes with different info?

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here. 1. 2. 3.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:10

github_iconTop GitHub Comments

3reactions
daviscabralcommented, Sep 2, 2018

There is a new version now that fix this. To get it right, with reset, use Actions.reset or set type={ActionConst.RESET} in the scene you want to behave like that.

Again, I am not able to publish any version, so you will have to use master to test it there.

Please reopen this if the fix haven’t worked.

2reactions
tikkichan4commented, Aug 15, 2018

Workaround (change the push method in navigationStore.js

  push = (routeName, data) => {
    const params = filterParam(data);
    this.dispatch({ type: StackActions.PUSH, routeName, params });
  };

Hope this help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-router-flux/CHANGELOG.md - UNPKG
46, - Custom title not centered on Android after upgrade to 4.0.1 ... 110, - Stack of same scene not working anymore after...
Read more >
Unity Ads 4.0.x- ads wont work on loading next scene or after ...
The same happens after Reloading the scene. What should I do next? using UnityEngine; using UnityEngine.Advertisements; using UnityEngine.
Read more >
Source - GitHub
[\#3206](https://github.com/aksonov/react-native-router-flux/issues/3206) ... Stack of same scene not working anymore after update from 4.0.0-beta-28 to ...
Read more >
react-native-router-flux | Yarn - Package Manager
React Native Router (v4.x) Backers on Open Collective Sponsors on Open ... It helps users to define all the routes in one central...
Read more >
Reactnative Router Flux Actions Is Not Navigating To Other ...
Stack of same scene not working anymore after update from 4.0.0beta28 to 4.0.1 But reactnavigation still exposes older push actions.
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