Expo SDK 44: AnimatePresence + MotiView crash
See original GitHub issueHi,
a simple
<AnimatePresence exitBeforeEnter>
{cameraPosition === 'back' && (
<MotiView
key="torch"
from={{
opacity: 0,
scale: 0.9
}}
animate={{
opacity: 1,
scale: 1
}}
exit={{
opacity: 0,
scale: 0.9
}}
>
<PressableOpacity
style={styles.button}
onPress={onFlashPressed}
disabledOpacity={0.4}
>
<Ionicons
name={flash === 'on' ? 'flash' : 'flash-off'}
color="white"
size={24}
/>
</PressableOpacity>
</MotiView>
)}
</AnimatePresence>
crashed the app for me. Had to boot XCode in order to get the message:
2021-12-22 10:20:23.980439+0100 development[5573:1639062] [native] Tried to synchronously call anonymous function from a different thread.
Occurred in worklet location: /Users/hirbod/.../node_modules/react-native-reanimated/lib/reanimated2/hook/useAnimatedStyle.js (332:24)
Possible solutions are:
a) If you want to synchronously execute this method, mark it as a Worklet
b) If you want to execute this method on the JS thread, wrap it using runOnJS
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
React Native Expo SDK 44 expo-camera crashing when Eas ...
Expo SDK 44 : expo-camera is crashing when the application is run on Eas build while it works fine on the normal expo...
Read more >Installation | Moti
Moti 0.17.x requires Reanimated 2.3.0 or higher. This version is compatible with Expo SDK 44. Moti 0.16.x is compatible ...
Read more >Reanimated - Expo Documentation
react-native-reanimated provides an API that greatly simplifies the process of creating smooth, powerful, and maintainable animations.
Read more >Topics tagged Reanimated - Expo Forums
Expo sdk 44 splash screen error on android 5.1 · Expo SDK ... Reanimated 2 compatibility with SDK 44 · Expo SDK ......
Read more >Expo SDK 45. Today we're announcing the release of…
A race condition would cause prior versions of expo-dev-client to crash the first time they were used on an iOS device has been...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Exotic will skip the
moti
package name in Metro the same way Webpack auto skips moti. Learn how to fix here.Nice @EvanBacon. Thanks