Open chirag-uemk opened 1 month ago
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loop.
A solution to the issue was found in changing the following line in Line 29 of PageContainer.js :
const { uid, sessionExpired, sessionDetail } = useSelector((state) => state.auth );
The code can be changed to :
const { uid, sessionExpired, sessionDetail } = useSelector((state) => state?.auth || {});
Returning an empty object when a state is not returned seems to fix the problem.
The exact auth changes can be made in the other js files :
CoreRoutes.js PageLoader.js CoreAppDiv.js AppContainerLayout.js Logout.js SplashComponent.js CoreDrawer.js DefaultAppBarContent.js CoreRoutesProvider.js CoreThemeProvider.js ReportIssueForm.js CoreFade.js
Describe the bug Getting the following error on screen once I've created a application from wrappid-app template and setup the project with toolkit command and start the project. Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
To Reproduce Steps to reproduce the behavior:
wr init <project-name>
wr setup web
wr start web
Expected behavior The /defultAppRoute supposed to show a boilerplate default page.
Stack Trace
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information): N/A
Additional context N/A