shubhnik / redux-react-navigation-demos

React-Native + Redux + Redux-Persist + React Navigation ( Authentication Flow with Redux demos)
152 stars 55 forks source link

App crashing on start #8

Open ekanshoyo opened 6 years ago

ekanshoyo commented 6 years ago

Hey! Just cloned master branch and ran the app for the first time it's throwing error:-

TypeError: undefined is not a function (evaluating 'e')

Any idea what's this about.

dihan commented 6 years ago
screen shot 2018-02-11 at 08 34 21
dihan commented 6 years ago

Seems to be an issue with the updated version of React-Navigation

https://github.com/infinitered/ignite/issues/1225

corysimmons commented 6 years ago

As @dihan pointed out. react-navigation went through a ton of changes recently. A few article writers released redux/react-navigation posts as react-navigation was in beta (as denoted by the -beta flag on the version).

To get this working, version-lock it.

Remove the ^ on https://github.com/shubhnik/redux-react-navigation-demos/blob/3ab7253841cefade35bbd2f6a840f347b4036401/package.json#L12


That said, these tutorials are pretty useless now unless you plan on learning incorrect stuff or version locking yourself at that beta release forever. FeelsBadMan.

MatheusParanhos commented 6 years ago

@corysimmons Damn. I was really trying to integrate redux with my navigation. Have you found any workaround for this?

corysimmons commented 6 years ago

@MatheusParanhos https://reactnavigation.org/docs/redux-integration.html works but it's a pain to actually maintain.

I highly suggest you think twice about why you're using Redux with ReactNavigation, and if you can get away with not doing it, since there doesn't seem to be any elegant way to do React nav with Redux.