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>,
},
})
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
1. Read the FAQs 👇
Read
2. Describe the bug
After migrating from
framer-motion
tomotion
, I can't no more pass MotionValue to a component frommotion/react-m
: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",