-
Notifications
You must be signed in to change notification settings - Fork 280
Description
import { FALLBACK_ERROR_MESSAGE } from "@/constants"
import { hono } from "@/lib/hono"
import { useMutation } from "@tanstack/react-query"
import { Link } from "expo-router"
import { Pressable, ScrollView, Text } from "react-native"
import { SafeAreaView } from "react-native-safe-area-context"
import Toast from "react-native-toast-message"
const GetStartedScreen = () => {
const getArticlesMutation = useMutation({
...
onError: (error) => Toast.show({
type: "error",
text1: "Error",
text2: error.message || FALLBACK_ERROR_MESSAGE,
autoHide: true,
visibilityTime: 3000,
position: "top",
avoidKeyboard: true,
swipeable: true,
}),
...
})
return (
...
)
}
export default GetStartedScreen
Well its working for me that it is displaying toast on error but as you can see i have autoHide and visibilityTime set it is not hiding...