Should load without error when consuming via hook.
const { enqueueSnackbar, closeSnackbar } = useSnackbar();
Throws an error Cannot read property 'handleEnqueueSnackbar' of undefined.
Link: https://codesandbox.io/s/strange-bird-jclt4
const { enqueueSnackbar, closeSnackbar } = useSnackbar();You forgot to wrap your app inside a SnackbarProvider. See basic usage for more info.
working example:
https://codesandbox.io/s/gifted-https-ply3y

Thank you!
Most helpful comment
You forgot to wrap your app inside a
SnackbarProvider. See basic usage for more info.working example:
https://codesandbox.io/s/gifted-https-ply3y