Toast no longer visible, update to Expo 54 cause animations to stop working
Describe the bug
I've just updated to Expo 54 and now the animations (e.g. Animated.spring() in useSlideAnimation.js) no longer works and thus the toast is not 'slid in' and not visible.
That pretty much breaks the entire functionality...
Environment:
- OS: iOS & Android
- react-native-toast-message version: 2.3.3
- react-native version: 0.81.4
Additional context
The animated values are calculated (underwater) but are not reflected in the app (I think because components are not redrawn).
I think (not sure) it's caused by the move to reanimation v4, which basically requires the use of withSpring() from reanimation. Or maybe because of the move to the new architecture ("newArchEnabled": true), though I haven't been able to successfully build the app with "newArchEnabled": false so I can't confirm.
Possibly related to https://github.com/calintamas/react-native-toast-message/issues/581
I can also confirm that the exact same behaviour has began in my project immediately after upgrade to Expo version 54.
I've been testing right now and it's working for me.
Environment tested:
- Expo Go;
- Android Build.
Dependencies:
{
"expo": "~54.0.10",
"react-native": "0.81.4",
"react-native-toast-message": "^2.2.1"
}
I've been testing right now and it's working for me.
Environment tested:
- Expo Go;
- Android Build.
Dependencies:
{ "expo": "~54.0.10", "react-native": "0.81.4", "react-native-toast-message": "^2.2.1" }
Not working
I've been testing right now and it's working for me.
Environment tested:
- Expo Go;
- Android Build.
Dependencies:
{ "expo": "~54.0.10", "react-native": "0.81.4", "react-native-toast-message": "^2.2.1" }
Not working
Hi! How is your root _layout.tsx or App.tsx?
Any update on this ??
Package.json "expo": "^54.0.23", "react-native": "0.81.5", "react-native-toast-message": "^2.3.3",
Added
I've created a Fork of this project and moved the react-native animation stuff to reanimated v4 (compatible with expo 54). I've just prompted the entire thing because I just needed it to work asap. I wasn't able to fix (or run for that matter) the tests but the toast works in my application. These are the changes: https://github.com/Ken-vdE/react-native-toast-message/pull/1/files
You could install by cloning the repo (not in a subdirectory of another npm project) using -b reanimated (or checking out branch 'reanimated'),
running yarn install && yarn build
and then installing it in your react native app using pnpm add file:/path/to/react-native-toast-message.
NOTE: I am not going to maintain it for the general public for now. I will publish bugfixes if I encounter them in my own app.
same problem