-
Notifications
You must be signed in to change notification settings - Fork 43
reduxifyNavigator is causing this.props.navigation.addListener('didFocus') to not work #53
Comments
Thanks for setting up the repro repo. I'll try and take a look today. |
I think I have fixed this in |
I was able to reproduce it again with the Android back button depending on how nested navigation stack you have. Will try to reproduce on the repo that I've created. |
Any luck @diegoddox? |
Hi @Ashoat sorry I haven't had the time yet |
Hi, I'm also suffering the issue... |
…ux middleware execution timing[react-navigation#53]
fixes the issue for me. adding the timeout around didUpdateCallback works
@Ashoat can you please merge it and release a new version? |
Hey guys - the fix in xxyan0205@b7299f5 is to gate the The problem with the fix is that it is brittle. It may work on your simulators, but will it work on physical devices? On old devices? A new version of React Native or React Navigation might make it break, or force us to increase the timeout value. The real solution is to figure out why calling I am willing to investigate this issue and try to figure out what the right solution is. If the But first, I need either an Expo Snack or a repo that has a minimal project that reproduces the issue. This is an expectation in the React Navigation org, and in the broader React Native ecosystem. It is nigh-on impossible to debug and fix issues when you aren't able to reproduce them. To be absolutely clear: if you want a fix for this issue to be merged, then please take the time to create either an Expo Snack or a repo that reproduces the issue. Copy-pasting code will not suffice, nor will linking me to your existing project. |
hey @Ashoat, here is an example that I found on a different thread that should be sufficient for your investigation |
@shyaniv7, you've linked to a Snack that is using an outdated version of this package, and that is demonstrating a related but distinct issue that has long been fixed. |
@Ashoat 💩 I apologize, this is the wrong link. I cannot find the example I saw a few days ago this is another thread with the same issue described |
I had trouble making a repro-able case when I tried last week, for what it's worth. I tried building something from scratch using all the same packages and package versions and didn't get the buggy behavior, so there's something more subtle going on than just a bad combination of dependency versions. I'll try going the other direction (taking my app and breaking it down to a simple repro case), but it might be a while before I get a chance -- so if somebody else has time and beats me to it, please do. |
Hi @Ashoat! this issue has been fixed? |
The original reported issue was fixed. The second reported issue still doesn’t have a repro. There is a hack in #60 that may help avoid the second issue if you’re experiencing it. |
i'm using this tut and not word @Ashoat
|
I can investigate further if you can provide an MCVE that reproduces the issue, in the form of an Expo Snack or a |
I am also experiencing this issue randomly. Can't find out the exact reason. On some screens it does work as expected, but on the others they don`t within the same navigator. Hope this will be fiixed soon. |
@Ashoat I am facing with the same issue. I am using Infinite Red's Ignite boilerplate (Andross), and the issue exists on a completely clean install. I created a somewhat MCVE (a clean Ignite Andross install), you can find it on https://github.com/bencergazda/react-navigation-redux-helpers-issue-53 I could not catch any event at all, but the implementation looks to be OK. Could you please have a look at it? By default Andross uses |
Are you able to reproduce without Ignite? If yes, can you put up an MCVE (as specified above, either through Expo Snack or |
has it been well tested?? Im facing the same problem u.u please help
|
mee too |
FYR: I tried below and it works :
|
You save my life! :) |
Superb. You saved me a thousand of minutes breaking this problem |
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.
shyaniv7/react-navigation@2059422 mentioned in react-navigation/react-navigation#4670 (comment) works for me. |
First thanks for the lib.
Description
I encounter a strange behavior while upgrading to
react-navigation@2
. Following the example in the docs I noticed that thenavigation.AddListener('didFcous'
was not working on every screen.After many hours of debugging, I found out that by removing the
reduxifyNavigator
all screen that was listening for the eventdidFocus
was working normally.The issue
This accour when you have a screen that is listening for
didFcous/some other events
and is connected to redux and bydispatching
an action inside of the firstdidFocus
the nextdidFcous
on the stack will not work.I've used some time to create a repo that can reproduce this issue.
https://github.com/diegoddox/navigation-redux-helper
This is the file that you wanna take a look.
https://github.com/diegoddox/navigation-redux-helper/blob/master/Route.js
dependencies.
react: 16.4.1
react-native: 0.54.0 | 0.56.0
react-navigation: 2.6.2 | 2.8.0
react-navigation-redux-helpers: 2.0.2
react-redux: 5.0.7
redux: 4.0.0
The text was updated successfully, but these errors were encountered: