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

Warning: ReactClass: You're attempting to include a mixin that is either null or not an object. #6

Closed
benjarwar opened this issue Jun 27, 2018 · 5 comments

Comments

@benjarwar
Copy link

I'm getting the following error with React Native 0.55.4:

ExceptionsManager.js:71 Warning: ReactClass: You're attempting to include a mixin that is either null or not an object. Check the mixins included by the component, as well as any mixins they include themselves. Expected object but got undefined.

The culprit seems to be NativeMethodsMixin which is coming back as undefined. Is this mixin necessary?

@iyegoroff
Copy link
Owner

create-text-gradient-class.js file borrows most of its structure from Text.js. So I'm not sure if NativeMethodsMixin is necessary - it is used only because Text.js also uses it.

@benjarwar
Copy link
Author

benjarwar commented Jun 27, 2018

I did some digging, and opened a question in the React Native repo. Seems like perhaps you're not supposed to try importing that mixin from outside of the core library. I'd check to see if you're using any of the mixin's methods, and if not, consider removing it from the class.

@benjarwar
Copy link
Author

React Native repo's bot automatically closed that ticket for not adhering to their issue templates... I suggest investigating removing the undefined mixin. Best I can tell it's not exposed by React Native.

@iyegoroff
Copy link
Owner

Looks like you are right - NativeMethodsMixin is not exported from rn and can't be used by third-party components facebook/react#12212

@iyegoroff
Copy link
Owner

Removed this warning in 0.0.9

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

No branches or pull requests

2 participants