Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

fix:didFocus event can't be triggered due to component update and red… #60

Closed
wants to merge 1 commit into from

Conversation

xxyan0205
Copy link

…ux middleware execution timing[#53]

I found that didUpdateCallback(in ReduxifyNavigator - componentDidUpdate) will be executed before redux middleware handler, which means DelayedSubscriber will be triggered before being added.

@@ -43,7 +43,9 @@ function reduxifyNavigator<State: NavigationState, Props: RequiredProps<State>>(
}

componentDidUpdate() {
didUpdateCallback();
setTimeout(() => {
didUpdateCallback();

This comment was marked as abuse.

Copy link
Member

@Ashoat Ashoat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before I can consider merging this PR, I’ll need to be able to reproduce the issue you describe, so that I can verify this is the best fix for it.

Can you please create an Expo Snack that reproduces this issue? Please include only the minimal code necessary to reproduce it. If you can’t reproduce the issue in an Expo Snack, you can try using react-native init to create a new empty project and see if you can reproduce the issue there.

@xxyan0205 xxyan0205 closed this Sep 7, 2018
mnzaki added a commit to jolocom/smartwallet-app that referenced this pull request 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.
@flyskywhy
Copy link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants