Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] MotionValue does not fit motion/react-m after migrating #2887

Open
boar-is opened this issue Nov 16, 2024 · 3 comments
Open

[BUG] MotionValue does not fit motion/react-m after migrating #2887

boar-is opened this issue Nov 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@boar-is
Copy link

boar-is commented Nov 16, 2024

1. Read the FAQs 👇

Read

2. Describe the bug

After migrating from framer-motion to motion, I can't no more pass MotionValue to a component from motion/react-m:

import type { MotionValue } from 'motion/react'
import { div } from 'motion/react-m'

div({
  style: {
    // error here
    x: 5 as unknown as MotionValue<number>,
  },
})

image

TS2322: Type MotionValue<number> is not assignable to type
string | number | CustomValueType | MotionValue<number> | MotionValue<string> | MotionValue<any> | undefined
Type MotionValue<number> is not assignable to type MotionValue<any> with 'exactOptionalPropertyTypes: true'. Consider adding undefined to the types of the target's properties.
Types have separate declarations of a private property current

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

N/A

4. Steps to reproduce

N/A

5. Expected behavior

No error

6. Video or screenshots

N/A

7. Environment details

"motion": "11.11.17",

@boar-is boar-is added the bug Something isn't working label Nov 16, 2024
@feledori
Copy link

just bumped into this exact issue as well

@tdn352001
Copy link

same issue here

@abgregs
Copy link

abgregs commented Dec 23, 2024

+1 just ran into this as well and was a bit confused by it. Using motion version 11.13.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants