Skip to content

Importing NativeMethodsMixin #19936

Closed
Closed
@benjarwar

Description

@benjarwar

I'm trying to use a third party component, react-native-text-gradient, but am getting a warning in my console as follows:

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.

It seems that doing import NativeMethodsMixin from "react-native"; returns undefined. I've created an issue in that repo, but in researching further it seems that NativeMethodsMixin is perhaps not exposed outside of the core library.

I've also tried updating how the lib's importing NativeMethodsMixin as per @hramos's proposal in this similar/closed issue:

import NativeMethodsMixin from 'NativeMethodsMixin';

But that throws:

Unable to resolve module NativeMethodsMixin from <redacted>: Module NativeMethodsMixin does not exist in the Haste module map

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions