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

Actions.[key] not working #2334

Closed
relense opened this issue Sep 4, 2017 · 1 comment
Closed

Actions.[key] not working #2334

relense opened this issue Sep 4, 2017 · 1 comment

Comments

@relense
Copy link

relense commented Sep 4, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.21
  • react-native v0.47.2

Expected behaviour

It should change scene, but it doesnt.

Actual behaviour

It load the initial scene after the root one. Then it simply gets stuck and doesnt change.
If I have the hot reloading on and actually hot reload it will change scene..

This is what I have in my index.js file.

  return (
      <View style={{ flex: 1 }}>
        <MenuContext style={{ flex: 1 }}>
          <Router createReducer={reducerCreate}>
            <Scene key="root" initial={true} style={{ backgroundColor: '#424949' }} type={ActionConst.REPLACE}>
              <Scene key="landing" component={Loading} hideNavBar panHandlers={null} />
              <Scene key="login" component={Login} hideNavBar panHandlers={null} animation='fade' type={ActionConst.REPLACE} />
              <Scene key="mainPage" component={MainPage} index={this} idUser="..." hideNavBar={true} type={ActionConst.REPLACE} panHandlers={null} animation='fade' />
              <Scene key="facebookPhotos" component={FacebookPhotos} hideNavBar={true} animation='fade' />
              <Scene key="photoMenu" component={PhotoMenu} hideNavBar={true} animation='fade' />
              <Scene key="albumPage" component={AlbumPhotosPage} idAlbum='...' hideNavBar={true} animation='fade' />
              <Scene key="confirmPhoto" type={ActionConst.RESET} component={ConfirmPhoto} urlPhoto='...' hideNavBar={true} animation='fade' />
              <Scene key="newMatchPage" component={NewMatchPage} matchType='...' idMatch='...' idOtherUser='...' animation='fade' hideNavBar={true} />
              <Scene key="chatWindow" idMatch='...' first='...' second='...' matchType='...' numPaginasPop='0' unmounted={false} component={ChatWindow} duration={200} animation='fade' hideNavBar={true} />
              <Scene key="deleteAccount" component={DeleteAccount} animation='fade' />
              <Scene key="feedback" component={Feedback} animation='fade' />
              <Scene key="uniRace" component={UniRace} animation='fade' />
              <Scene key="uniRank" component={UniRank} animation='fade' />
              <Scene key="uniRaceTemp" component={UniRaceTemp} animation='fade' />
              <Scene key="addSchool" component={AddSchool} animation='fade' />
              <Scene key="monetizationSlideshow" component={MonetizationSlideshow} animation='fade' />
              <Scene key="whoVoted" component={WhoVoted} animation='fade'  />
              <Scene key="customWebView" component={CustomWebView} animation='fade'  />
              <Scene key="instagramAlbumPhotoPage" component={InstagramAlbumPhotoPage} animation='fade' />
            </Scene>
          </Router>
        </MenuContext>
        <CustomAlert />
        <OneSignalPush />
      </View>
    );
  }
}

I know he gets to the other js file where the Actions.login(); function is called but it doesnt do anything..

I used the reducer to see wich actions where being called and logged this:

ACTION: {type: "REACT_NATIVE_ROUTER_FLUX_REPLACE", routeName: "login", params: {…}}
C:\fmk-rnapp\app\index.js:58 ACTION: {type: "REACT_NATIVE_ROUTER_FLUX_BLUR", routeName: "landing"}
C:\fmk-rnapp\app\index.js:58 ACTION: {type: "REACT_NATIVE_ROUTER_FLUX_FOCUS", routeName: "login", params: {…}}
C:\fmk-rnapp\node_modules\react-native-meteor\src\Meteor.js:102 Connected to DDP server.
C:\fmk-rnapp\node_modules\react-native-code-push\logging.js:3 [CodePush] App is up to date.

Any help would be appreciated..

@relense relense closed this as completed Sep 4, 2017
@schlaegerz
Copy link

Did you ever figure out this issue? I'm having similar problems

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

2 participants