Skip to content

Toast is displayed forever, not hiding after visibilityTime expire... #581

@shubham26062002

Description

@shubham26062002

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions