5👍
It looks to me like you’re just calling SweetAlert incorrectly.
So rather than this:
toast({
type: 'success',
title: 'User Created in successfully'
})
it should be:
toast.fire({
type: 'success',
title: 'User Created in successfully'
})
Alternatively if you want to use toast
as a function you could define it as:
window.toast = function (...args) {
return toast.fire(...args);
};
Source:stackexchange.com