useSnackbar
Helper hook to show a Joy UI Snackbar.
Also includes the SnackbarProvider component, which needs to be mounted on the page.
Arguments
No arguments.
Returns
A Snackbar object with the following fields:
show
: A function that shows a snackbar, taking as only argument a list of props to pass to the Snackbar component.showSuccess
: A function that shows a snackbar with a default success styling, taking a ReactNode (often a string) as argument.showError
: A function that shows a snackbar with a default error styling, taking a ReactNode (often a string) as argument.