I'm using react-toastify to pop up an error message. Why do I get this error?
TypeError: Object(...) is not a function useToastContainer E:/Courses/programing/Code with Mosh/Front End/Mastering React/08 - Calling Backend Services (01h42m)/Section 8- Calling Backend Services/start/http-app/node_modules/react-toastify/dist/react-toastify.esm.js:866
Once I remove ToastContainer
component everything works normally. What should I do to get rid of this error, and why do I get it?
I got the same problem here, I guess we are both using the newest version of react-toastify, but after I change the version with 4.1 (which the instructor is using) and it solved !
First, you need :
npm uninstall react-toastify --save
Then, reinstall it with the version 4.1
npm i react-toastify@4.1