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

NativeMethodsMixin is undefined #7

Closed
tijp opened this issue Nov 27, 2016 · 5 comments
Closed

NativeMethodsMixin is undefined #7

tijp opened this issue Nov 27, 2016 · 5 comments
Assignees
Labels

Comments

@tijp
Copy link

tijp commented Nov 27, 2016

When using React 15.4.0 or higher, Parallax.js cannot find NativeMethodsMixin.
Since React 15.4.0 they have moved NativeMethodsMixin from the React package to the React Native package. see here

I managed to fix it by simply changing this in Parallex.js

import React, { Component, } from 'react';
import NativeMethodsMixin from 'react/lib/NativeMethodsMixin';
import { Animated, View, Dimensions } from 'react-native';

to this

import React, { Component, } from 'react';
import { Animated, View, Dimensions, NativeMethodsMixin } from 'react-native';

I can create a pull request to fix this, however I dont know how this is going to affect older versions of react native or react.

@SoHotSoup
Copy link
Contributor

Hey @TimIJpenga!
You can create a pull request, there are several ways to address it. You can either change peerDependencies, if you replace ^ with ~ on react's version or if newer React Native versions are dependent on react 15.4.0, then change import as you already suggested and upgrade react-native version (inside our package.json) to one that has NativeMethodsMixin included.

Thank you for giving us support on this issue!

@SoHotSoup
Copy link
Contributor

If you need any help, we can do it together!

@tijp
Copy link
Author

tijp commented Nov 28, 2016

Hi @SoHotSoup
When I get home in about 4 hours I will look at it and see what it does with different versions.
I will let you know when I need help, thank you.

@SoHotSoup
Copy link
Contributor

Cool! Thank you!

@SoHotSoup
Copy link
Contributor

Fixed by #8

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

No branches or pull requests

2 participants