react-native-root-toast
react-native-root-toast copied to clipboard
Doesn't work with latest Expo
Bare bones expo project latest version and no toast.
import {router, Stack, useRouter} from "expo-router"
import {useEffect} from "react"
import { RootSiblingParent } from 'react-native-root-siblings';
import Toast from "react-native-root-toast"
import {Text, TouchableOpacity, View} from "react-native"
export default function RootLayout() {
return (
<RootSiblingParent>
<View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
<TouchableOpacity onPress={() => {
Toast.show('Test', {
duration: 5000 ,
});
}}>
<Text>test</Text>
</TouchableOpacity>
</View>
</RootSiblingParent>
)
}
I had a similar error. Try installing react-native-root-siblings@^4.0.0
.
checkout https://github.com/calintamas/react-native-toast-message
@liquid36 solution worked for me!!!
I had a similar error. Try installing
react-native-root-siblings@^4.0.0
.
It worked for me~~~~~~
My env: [email protected] [email protected] expo@^51