addToast

Use this method to render a toast on screen.

The available options are:

{
type?: 'success' | 'error' | 'info' | 'warning'; // default: info
title?: string;
message: string;
}

For example, displaying a success toast would be:

import { useToast } from 'react-native-rooster';
const { addToast } = useToast();
addToast({
type: 'success',
message: 'Success message'
});
Last updated on by Mateus Andrade