actually i have got same problem/warning ,
and in my case i am using "react-toastify" inside my next.js application with context api,
and after a lot of searching ...
i found the problem coming from :
toast.configure() method
and i am use it inside my context api module ,
and also i found the official "react-toastify" Docs talking about some problems related with this method when use it with context api , and they are removed this method from the new version .
and here is the link for official docs:
https://fkhadra.github.io/react-toastify/migration-v9#toastconfigure-removal
finally i solved my problem by using the following steps :
1-remove toast.configure() from my context api module .
2- instead of using toast.configure() , i used "ToastContainer" component inside "_app" module "just define it , the toast will works fine" as expected , and here is my "_app.js module " :
import { useEffect } from 'react';
import '../styles/globals.css'
import 'bootstrap/dist/css/bootstrap.css';
import Nav from '../components/nav';
import Footer from '../components/footer';
import { AuthProvider } from '../my_utils/myContext/authcontext';
import { ToastContainer } from 'react-toastify';
function MyApp({ Component, pageProps }) {
useEffect(() => {
import ('bootstrap/dist/js/bootstrap.js')
import ('react-toastify/dist/ReactToastify.css')
}, []);
return (
<>
<AuthProvider>
<Nav />
<div className="allButFooter ms-3 me-3">
<Component {...pageProps} />
<ToastContainer />
</div>
<Footer />
</AuthProvider>
</>
)
}
export default MyApp
i don't know if your case same my case ,
but i hope that helpful for you .