Closed MatteoGauthier closed 1 year ago
The MotiPressable component animation don't play on IOS Simulator but it works on the web version
MotiPressable
No response
Just use MotiPressable component
<MotiPressable animate={({ hovered, pressed }) => { 'worklet' return { scale: pressed ? 0.95 : hovered ? 1.1 : 1, rotateZ: pressed ? '0deg' : hovered ? '-3deg' : '0deg', } }} from={{ scale: 0, rotateZ: '0deg', }} transition={{ type: 'timing', duration: 150, }} style={sx({ width: 100, height: 100, backgroundColor: '#f4a261', borderRadius: 10, m: 3, })} > </MotiPressable>
- Moti: 0.19.0-alpha.6 - Reanimated: 2.9.1 - React Native: 0.69.5
npx create-react-native-app -t with-moti
add this code block
<MotiPressable animate={({ hovered, pressed }) => { 'worklet' return { scale: pressed ? 0.95 : hovered ? 1.1 : 1, rotateZ: pressed ? '0deg' : hovered ? '-3deg' : '0deg', } }} from={{ scale: 0, rotateZ: '0deg', }} transition={{ type: 'timing', duration: 150, }} style={({ width: 100, height: 100, backgroundColor: '#f4a261', borderRadius: 10, m: 3, })} > </MotiPressable>
I think the starter app is outdated. Can you update moti?
Is there an existing issue for this?
Current Behavior
The
MotiPressable
component animation don't play on IOS Simulator but it works on the web versionExpected Behavior
No response
Steps To Reproduce
Just use
MotiPressable
componentVersions
Screenshots
No response
Reproduction
npx create-react-native-app -t with-moti
add this code block