-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Dimensions.addEventListener is not a function #2824
Comments
Can you ensure you're using the latest release? 1.0.0-beta.15 |
tbh you are almost 8 versions of react native behind, and probably some of the other libraries/nested dependencies have been updated to be compliant to newer versions. That said, why do you think it's related to |
Still not working with "react-navigation": "^1.0.0-beta.15" |
This is the 2 errors i have in the console of the React Native Debugger
|
@kelset As i said, It was working before. I've just got this issue since in reinstalled my dependencies |
Then it's 100% related to some nested dependency of any of the libraries you are using in your project. So I don't understand why it should be Unluckly in the |
I'm experiencing this today after adding react-navigation version |
I don't know what you are trying to obtain @LouisJS by opening a clone issue (#2830). Unless:
I won't re-open this issue. Again, you are using a really old version of the |
I'm also having this issue today. My RN version is 0.42.0, node v8.1.2, npm v4.6.1 and react-navigation v1.0.0-beta.11. |
Was able to fix this by updating a react-navigation dependency, react-native-tab-view to version 0.0.67. |
Our team had the issue with react-navigation v1.0.0-beta.15. Downgrading to .11 resolved the issue. |
I have the same issue eith both react-navigation v1.0.0-beta.15 and .11 |
The causes of this is the addition of If you're on 0.42 or below you'll run into issues because Dimensions.addEventListener wasn't added until 0.43. 0.43 came out in April. |
Makes sense. I’m on 0.42.3
…On Sat, Oct 28, 2017 at 10:22 AM Spencer Carli ***@***.***> wrote:
The causes of this is the addition of withOrientation which helps the
navbar work in a more consistent manner (though it will be replaced later).
@swl367 <https://github.com/swl367> @yusisi <https://github.com/yusisi>
it seems this issue is related to having a vastly outdated version of React
Native. What version are you running on?
If you're on 0.42 or below you'll run into issues because
Dimensions.addEventListener wasn't added until 0.43. 0.43 came out in April.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2824 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA_qRqcQtVlyKkWeAjgqsS1D_l-kxvznks5sw0bMgaJpZM4QGSne>
.
|
I face similar issue and my packages were:
I had to downgrade react-navigation to 1.0.0-beta.13 to fix this issue. |
i face simiar issue too
I had to downgrade react-navigation to 1.0.0-beta.21 to fix this issue -- update const navigation = addNavigationHelpers({ dispatch, state: router, addListener: () => {} })
return <AppNavigator navigation={navigation} /> |
Same, downgrade to :
|
@adnanaliarshad thank you so much ,I've been stuck with this problem these two days. "react-native": "0.42.3",
"react-navigation": "^1.1.2" downgrade react-navigation to:
works fine 😃 |
(react-native: 0.53.3) After updating to v1.0.0-beta.28 I also started getting the same error as @javahuang. I then updated to the last version of react-navigation (v 1.2.0) and I was still getting the same error:
I had a look at react-navigation documentation regarding redux integration again and it seems that after 1.0.0-beta.28, addNavigationHelpers have a third parameter addListener.
After adding the addListener, I stopped getting the error. However, now I get another error when using this.props.navigation.navigate. It seems that I lose dispatch in the process.
EditBefore I was passing mapDispatchToProps as an object of actionCreators, but now I also have to assign dispatch:
Everything is working great on v1.2.0 👍 🎉 |
Current Behavior
When i'm trying to use react-navigation in my project.
I'm having :
It worked until really recently when i tried to remove my node_modules and install them again.
Your Environment
The text was updated successfully, but these errors were encountered: