Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum update depth exceeded. React 18, Redux-Toolkit #3611

Open
1 task done
RiodeJaneiroo opened this issue Dec 13, 2022 · 4 comments
Open
1 task done

Maximum update depth exceeded. React 18, Redux-Toolkit #3611

RiodeJaneiroo opened this issue Dec 13, 2022 · 4 comments
Labels
bug Chart The DevExtreme Reactive Chart component STATE: Need response

Comments

@RiodeJaneiroo
Copy link

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

Sandbox

Environment

  • devextreme-reactive: 4.0.0
  • react: 18.0.2
  • material-ui: 5.11.0
@Krijovnick
Copy link
Contributor

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.

@Krijovnick Krijovnick added the Chart The DevExtreme Reactive Chart component label Dec 14, 2022
@vladis-c
Copy link

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

@TimothyMather
Copy link

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.

@bryanjtc
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Chart The DevExtreme Reactive Chart component STATE: Need response
Projects
None yet
Development

No branches or pull requests

5 participants