Maximum update depth exceeded. React 18, Redux-Toolkit
RiodeJaneiroo opened this issue · comments
Is there an existing issue for this?
- I have searched this repository's issues and believe that this is not a duplicate.
I'm using ...
React Chart
Current Behaviour
When we use React 18 and Redux-Toolkit we got a 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.
Sandbox
Expected Behaviour
No response
Steps to Reproduce
Environment
- devextreme-reactive: 4.0.0
- react: 18.0.2
- material-ui: 5.11.0
Hi @RiodeJaneiroo,
Thank you for interest in our product. In strict mode, React 18 hooks are run twice to identify unexpected results. And this change causes infinite data loops in our Chart component. As a workaround, you can remove StrictMode
from the code. I'd like to note that you shouldn't get this error in production mode.
Hi @RiodeJaneiroo,
Thank you for interest in our product. In strict mode, React 18 hooks are run twice to identify unexpected results. And this change causes infinite data loops in our Chart component. As a workaround, you can remove
StrictMode
from the code. I'd like to note that you shouldn't get this error in production mode.
Your solution does not work. Not strict mode disabling nor it works in production. Please, fix it guys! Whereas people have to switch to other packages rather than yours
Any update on this? I'm also seeing this error, removing StrictMode
lets the charts render but I'd rather have the issue solved than just hide that the error is happening.
Any update on this?