react-native-root-toast icon indicating copy to clipboard operation
react-native-root-toast copied to clipboard

Doesn't work with latest Expo

Open robertmylne opened this issue 1 year ago • 4 comments

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>
	)
}

robertmylne avatar Feb 07 '24 04:02 robertmylne

I had a similar error. Try installing react-native-root-siblings@^4.0.0.

liquid36 avatar Feb 07 '24 12:02 liquid36

checkout https://github.com/calintamas/react-native-toast-message

hichemfantar avatar Apr 25 '24 15:04 hichemfantar

@liquid36 solution worked for me!!!

pgill-rbi avatar Jun 19 '24 21:06 pgill-rbi

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

jeremyjone avatar Aug 09 '24 02:08 jeremyjone