question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Maximum update depth exceeded error in React 18 in strict mode

See original GitHub issue

Reduced Test Case

“not reproducible with a link”

Bug Description

Using version fullcalendar v5.11.0 and react v18.0.0, and react strict mode.

While using a view like in https://berrydashboard.io/app/calendar, with month, week, day grids and week list view, the error can be seen when:

  • changing views
  • on page reload

The same error happens when using only a single view ex: “dayGridMonth” when the page reload is performed.

The same view was working with fullcalendar v5.10.1 and react v17.0.2, and react strict mode.

Screenshots

164710056-916808a1-f4c0-4636-99a1-2f4b7dfb0611

react-dom.development.js?ac89:27084 Uncaught Error: 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. at checkForNestedUpdates (react-dom.development.js?ac89:27084:1) at scheduleUpdateOnFiber (react-dom.development.js?ac89:25266:1) at Object.enqueueSetState (react-dom.development.js?ac89:13234:1) at SimpleScrollGrid.Component.setState (react.development.js?1b7e:354:1) at SimpleScrollGrid._this.handleSizing (main.js?55c4:9089:19) at SimpleScrollGrid.componentDidUpdate (main.js?55c4:9183:14) at commitLayoutEffectOnFiber (react-dom.development.js?ac89:23146:1) at commitLayoutMountEffects_complete (react-dom.development.js?ac89:24461:1) at commitLayoutEffects_begin (react-dom.development.js?ac89:24447:1) at commitLayoutEffects (react-dom.development.js?ac89:24385:1) at commitRootImpl (react-dom.development.js?ac89:26651:1) at commitRoot (react-dom.development.js?ac89:26517:1) at performSyncWorkOnRoot (react-dom.development.js?ac89:25956:1) at flushSyncCallbacks (react-dom.development.js?ac89:11982:1) at eval (react-dom.development.js?ac89:25490:1)

The above error occurred in the component:

at SimpleScrollGrid (webpack-internal:///./node_modules/@fullcalendar/common/main.js:9741:47) at div at MountHook (webpack-internal:///./node_modules/@fullcalendar/common/main.js:5896:47) at ViewRoot (webpack-internal:///./node_modules/@fullcalendar/common/main.js:5954:47) at DayTimeColsView (webpack-internal:///./node_modules/@fullcalendar/timegrid/main.js:1607:47) at div at ViewContainer (webpack-internal:///./node_modules/@fullcalendar/common/main.js:8346:47) at CalendarContent (webpack-internal:///./node_modules/@fullcalendar/common/main.js:8489:47) at div at CalendarRoot (webpack-internal:///./node_modules/@fullcalendar/common/main.js:8670:47) at CalendarDataProvider (webpack-internal:///./node_modules/@fullcalendar/common/main.js:7856:28) at FullCalendar (webpack-internal:///./node_modules/@fullcalendar/react/dist/main.js:16:47)` Can you help me with this error pleas?

Thanks in advance!

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

10reactions
arshawcommented, May 31, 2022

Fixing this bug is my next development task.

7reactions
agiangrantcommented, Jul 14, 2022

PR has been opened for this issue https://github.com/fullcalendar/fullcalendar/pull/6917. Hoping for a quick review since these changes are very minor. I was also experiencing this issue consistently.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReactJS: Maximum update depth exceeded error
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate.
Read more >
Fix the "Maximum Update Depth Exceeded" Error in React
One quick solution is to move the function inside the useEffect hook. ... We can see that now incrementViews is scoped inside the...
Read more >
The "Maximum update depth exceeded" error occurs in React 18
In Strict mode, React hooks run twice to identify unexpected results: React 18 - Detecting unexpected side effects Perhaps, this change causes ...
Read more >
Error Decoder - React
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the ...
Read more >
cannot update a component while rendering a different ...
The error message will be displayed if parent (App) states are set while ... React - Maximum update depth exceeded / Cannot update...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found