Skip to content
This repository was archived by the owner on Apr 1, 2023. It is now read-only.
This repository was archived by the owner on Apr 1, 2023. It is now read-only.

Error when using hooks #99

Closed
Closed
@carloslfu

Description

@carloslfu

I'm bootstrapping a React component library with this tool and I get: Hooks can only be called inside the body of a function component.

Steps to reproduce:

  • Create a library with create-react-library.
  • Update react and react-dom to v16.7.0-alpha.0 in ./package.json and ./src/package.json.
  • Use new React hooks feature inside src/.

If you try the example you get the error. One weird thing is that if you use hooks in the example you don't get any error.

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