React-native-router-flux: 4.2.0 → 4.3.0: TypeError: navigationStore.getStateForAction is not a function.

Created on 30 Mar 2021  Â·  5Comments  Â·  Source: aksonov/react-native-router-flux

Version

  • react-native-router-flux v4.3.0
  • react v16.13.1
  • react-native v0.63.4

Expected behaviour

No component exception, similar to 4.2.0.

Actual behaviour

With upgrade to 4.2.0 → 4.3.0

TypeError: navigationStore.getStateForAction is not a function. (In 'navigationStore.getStateForAction(action, state)', 'navigationStore.getStateForAction' is undefined)

This similar ticket, didn't help me resolve this: https://github.com/aksonov/react-native-router-flux/issues/3294

My router:
```const reducerCreate = params => {
const defaultReducer = new Reducer(params);
return (state, action) => {
return defaultReducer(state, action);
};
};

class Routes extends React.Component {

render() {
return (

);
}
}

Routes.propTypes = {
dispatch: PropTypes.func,
};

export default connect()(Routes);

Most helpful comment

I'm facing this issue also. Upgraded to 4.3.1 because of iphone 12 bottom bar have problem and I saw that issue fixed at 4.3.1 now I'm here

All 5 comments

Could you reproduce it with react-native/Example or custom fork of it?

"react": "17.0.1",
"react-native": "0.64.0",
"react-native-router-flux": "^4.2.0",

Screenshot_1617913852

here is a quick fix, downgrade react-native-router-flux to react-native-router-flux": "4.0.0-beta.27" and run these commands

watchman watch-del-all
yarn cache clean --force
npm cache clean --force # optional - in case you also have used npm
rm -rf node_modules/
rm yarn.lock
rm package-lock.json # optional - in case you also have used npm
rm -rf $TMPDIR/metro-*
rm -rf $TMPDIR/haste-*
yarn
yarn start --reset-cache

reference:
https://github.com/aksonov/react-native-router-flux/issues/3023

I am having the same issue, I am trying to get currentscene, so I did redux implementation this same way - the example redux integration doesn't make much sense with everything in app.js, it is very confusing. is there another way to fix this besides downgrading? I have already made significant changes to my whole app because of 4.3.1.

I'm facing this issue also. Upgraded to 4.3.1 because of iphone 12 bottom bar have problem and I saw that issue fixed at 4.3.1 now I'm here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sarovin picture sarovin  Â·  3Comments

wootwoot1234 picture wootwoot1234  Â·  3Comments

kirankalyan5 picture kirankalyan5  Â·  3Comments

GCour picture GCour  Â·  3Comments

booboothefool picture booboothefool  Â·  3Comments