I'm trying to add toast notifications to my project. For some reason after adding
toast.configure();
code is not working and I have error:
react_toastify__WEBPACK_IMPORTED_MODULE_3__.toast.configure is not a function
Here is my code:
import {toast} from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
toast.configure();
function App() {
return(
<div>
if(error){
toast.error("error message...!");
}
<div>
)
}
Why am I getting this error? I have installed toast-notifications.
Thank you in advance.