Skip to content

Problem with forwardRef and hoist-non-react-statics #1

Description

@benjaminbillet

In react/9-hoc:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

This is caused by hoist-non-react-statics: mridgway/hoist-non-react-statics#48
forwardRef is quite a new primitive, it is not managed correctly by hoist-non-react-statics. I had to use the release candidate of the 3.0.0 to make it works, but this warning appeared.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions