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

Don't manually store react-navigation state #1326

Closed
mnzaki opened this issue Jun 6, 2019 · 2 comments
Closed

Don't manually store react-navigation state #1326

mnzaki opened this issue Jun 6, 2019 · 2 comments

Comments

@mnzaki
Copy link
Contributor

mnzaki commented Jun 6, 2019

Description

Currently we manually store react-navigation state in redux, which is not recommended and is not really useful.

Instead we should be using navigator.dispatch for dispatching navigation actions, following this guide

We should also get rid of the react-navigation-redux-helpers package, which would become useless.

This is somewhat related to #1325

@mnzaki
Copy link
Contributor Author

mnzaki commented Jul 4, 2019

It was even setup right and events weren't being handled by the custom reducers, because it was never combined into the root reducer.... #1361

mnzaki added a commit that referenced this issue Jul 15, 2019
infinitered/ignite-andross#277
moaazsidat/react-native-qrcode-scanner#161
moaazsidat/react-native-qrcode-scanner#177
moaazsidat/react-native-qrcode-scanner#136
react-native-camera/react-native-camera#1797
react-native-camera/react-native-camera#1686
react-native-camera/react-native-camera#1686
react-navigation/redux-helpers#87
react-navigation/redux-helpers#60
react-navigation/redux-helpers#53
https://www.youtube.com/watch?v=CnQ8N1KacJc

Fixes #1326

The navigation actions were turned into ThunkActions and now directly
call react-navigation's navigator.dispatch, which handles state
internally

Usages of the navigationActions were fixed

Also QRcodeScanner was cleaned up a bit and hacked to properly re-enable
the camera by re-rendering it (so it gets remounted). Now camera works
again if you press back after scanning a QR code.
@mnzaki
Copy link
Contributor Author

mnzaki commented Jul 22, 2019

Closed by #1374

@mnzaki mnzaki closed this as completed Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant