Open dannyhw opened 1 month ago
Getting the same issue when trying to get ahead of migration to Expo 51
"moti": "^0.28.1", "react-native-reanimated": "~3.10.1",
I'm able to get around the issue by changing to
transition={{
opacity: {
type: "timing",
duration: 1000,
}
}}
But its a bit tedious with multiple properties
Releasing shortly
I'm using version 0.29.0 with Expo SDK 51 and still get the issue. (TypeScript 5.3.3)
@alantoa looks like some people are still getting this on SDK 51, interesting
Hey @agallio, actually it works for me.
What if you run yarn why moti
and yarn why react-native-reanimated
in your project?
Curious about the version you are actually using.
Also, Can you please show me the type error in your code? (Hover over the error and take a screenshot of the error text.) @agallio
Hi @alantoa, thank you for the response. It's working now, I think it was because of my faulty node_modules
, when I tried to wipe all the node_modules
and yarn.lock
and then reinstall, it worked properly.
Got it, that's great!
Facing this issue with expo SDK 50.
moti version 0.29 react-native-reanimated version 3.6.2
You'll need to upgrade RN. The type issue is due to a typo in a react native type. The typo was fixed in RN 0.74
Is there an existing issue for this?
Do you want this issue prioritized?
Current Behavior
Type '{ duration: number; }' is not assignable to type 'MotiTransitionProp<StyleValueWithReplacedTransforms<ViewStyle | TextStyle | ImageStyle>> | ((custom?: any) => MotiTransition<...>) | undefined'.
Type '{ type: "timing"; duration: number; }' is not assignable to type 'MotiTransitionProp<StyleValueWithReplacedTransforms<ViewStyle | TextStyle | ImageStyle>> | undefined'.
Type '{ type: "timing"; duration: number; delay: number; }' is not assignable to type 'MotiTransitionProp<StyleValueWithReplacedTransforms<ViewStyle | TextStyle | ImageStyle>> | undefined'.
Expected Behavior
No response
Steps To Reproduce
Heres some examples that give me a type error
Versions
Screenshots
Reproduction
https://github.com/dannyhw/moti-types-repro
Run