frontend / shared/ui/ToastProvider / useToast
Function: useToast()
useToast():
ToastApi
Defined in: shared/ui/ToastProvider.tsx:101
Returns toast API for showing info and error messages. Part of React ContextAPI
Should be called only inside ToastProvider. If context is missing, throws error — this is intentional, because missing provider is a bug, not a valid fallback state.
Returns
ToastApi
showInfo(message, durationMs?)— shows neutral toast. Default duration is 3000 ms.showError(message, durationMs?)— shows red toast. Default duration is 3000 ms.