Answers for "notistack snackbar"

0

Notistack

import { useSnackbar } from 'notistack';

const MyButton = () => {
    const { enqueueSnackbar, closeSnackbar } = useSnackbar();

    const handleClick = () => {
        enqueueSnackbar('I love hooks');
    };

    return (
        <Button onClick={handleClick}>Show snackbar</Button>
    );
}
Posted by: Guest on October-03-2020
0

notistack snackbar

import { SnackbarProvider } from 'notistack';

<SnackbarProvider maxSnack={3}>
    <App />
</SnackbarProvider>
Posted by: Guest on January-21-2021

Browse Popular Code Answers by Language