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

Error on ios platform #3294

Closed
raidel-dev opened this issue Sep 26, 2018 · 10 comments
Closed

Error on ios platform #3294

raidel-dev opened this issue Sep 26, 2018 · 10 comments

Comments

@raidel-dev
Copy link

raidel-dev commented Sep 26, 2018

Version

  • react-native-router-flux v4.0.3
  • react v16.4.2
  • react-native v0.55.4

Expected behaviour

Actual behaviour

image

Steps to reproduce

Reproducible Demo

@alprtv
Copy link

alprtv commented Sep 26, 2018

I have the same error when upgrading from 4.0.1 to 4.0.2/4.0.3

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

This error is located at:
    in NavigationContainer (at Router.js:97)
    in App (at Router.js:122)

package.json

"react": "16.5.2",
"react-native": "0.57.1",
"react-native-router-flux": "^4.0.3",

Version 4.0.1 is work fine.

@aksonov
Copy link
Owner

aksonov commented Sep 26, 2018 via email

@raidel-dev
Copy link
Author

It was working well on android, but it is not working on only ios

@aksonov
Copy link
Owner

aksonov commented Sep 26, 2018

Please check examples/react-native - it works for iOS

@MaxInMoon
Copy link
Contributor

If your app breaks after upgrading to > 4.0.2, you should maybe re-consider your router declaration when app starts, as done here in the example

@daviscabral
Copy link
Collaborator

There was a change in the createReducer API like you can see in the image below.

screenshot 2018-09-26 18 15 00

PR #3295 shows the change in the expo example.

@aksonov
Copy link
Owner

aksonov commented Sep 27, 2018

My apologies for breaking change. I mistakenly thought that createReducer is not used by community ;)
4.0.4 should fix it - old API is preserved

@ebaynaud
Copy link

ebaynaud commented Dec 7, 2018

@aksonov still getting this error when running examples/react-native on ios with 4.0.6

@shiqkuangsan
Copy link

@aksonov me too, still getting this error when running examples/react-native on ios with V4.0.6

@ahsan-abrar
Copy link

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:
#3023

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

8 participants