Skip to content

New Warning: Invalid hook call in development with latest react experimental #3409

@bbenezech

Description

@bbenezech

In development, react@experimental triggers a react warning.

Environment

react-dom since 0.0.0-experimental-dc27b5aaa (2 weeks ago)
all versions of styled-components affected

Reproduction

https://codesandbox.io/s/styled-components-base-forked-yzpjn?file=/package.json

Steps to reproduce

Open the sandbox => console

Expected Behavior

No console.error in dev

Actual Behavior

console.error Warning: Invalid hook call. Hooks can only be called inside of the body of a function component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions