Skip to content

[BUG] react@beta (19) breaks motion's type #2640

@codehz

Description

@codehz

1. Read the FAQs 👇

2. Describe the bug

Give a clear and concise description of what the bug is.

when install react@beta with framer-motion@11.1.7, the type of motion are broken, make

<motion.div className="test" />

be marked as error in typescript (in fact all props from div are not applicable in motion.div

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

A CodeSandbox minimal reproduction will allow us to quickly follow the reproduction steps. Without one, this bug report won't be accepted.

https://codesandbox.io/p/devbox/pcm9tk?migrateFrom=n48ymv

4. Steps to reproduce

Just see the type error, it is not bug about behavior

5. Expected behavior

no type error when works with react 19 beta

6. Video or screenshots

image

7. Environment details

"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"@types/react": "npm:types-react@beta",
"@types/react-dom": "npm:types-react-dom@beta"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions