You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you help me to fix the below warning message in my _app.js code when combining NextAuth and Redux provider.
react-dom.development.js:88 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in Index (created by ConnectFunction)
in ConnectFunction (at _app.jsx:45)
App.js
importAppfrom'next/app';importReactfrom'react';import{Provider}from'react-redux';import{ProviderasNextAuthProvider}from'next-auth/client';importwithReduxfrom'next-redux-wrapper';importwithReduxSagafrom'next-redux-saga';import{persistStore}from'redux-persist';import{PersistGate}from'redux-persist/integration/react';importcreateStorefrom'../store/store';importDefaultLayoutfrom'../components/layouts/DefaultLayout';classMyAppextendsApp{constructor(props){super(props);this.persistor=persistStore(props.store);}componentDidMount(){setTimeout(function(){document.getElementById('__next').classList.add('loaded');},100);this.setState({open: true});}render(){const{ Component, pageProps, store }=this.props;constgetLayout=Component.getLayout||((page)=><DefaultLayoutchildren={page}/>);returngetLayout(<Providerstore={store}><PersistGateloading={<Component{...pageProps}/>}persistor={this.persistor}>{/* <NextAuthProvider session={pageProps.session}></NextAuthProvider> added by Libin on 25-03-21 for auth */}<NextAuthProvidersession={pageProps.session}><Component{...pageProps}/></NextAuthProvider></PersistGate></Provider>);}}
This discussion was converted from issue #1583 on March 25, 2021 19:47.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Can you help me to fix the below warning message in my _app.js code when combining NextAuth and Redux provider.
react-dom.development.js:88 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in Index (created by ConnectFunction)
in ConnectFunction (at _app.jsx:45)
App.js
Beta Was this translation helpful? Give feedback.
All reactions