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
While testing a component using DataGrid I am getting the following warning:
console.error ../../node_modules/react-dom/cjs/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 a useEffect cleanup function.
To Reproduce
Steps to reproduce the behavior:
Write a test which mounts a DataGrid
Expected behavior
There shouldn't be a warning.
I believe this is caused by useTubular calling useEffect() but not returning a cleanup function, so the dispatch when the API call is complete fires after the component is unmounted.
Ideally the processRequest() api could be updated to handle the return of a Future which can be canceled. I will try to put a PR together to fix this, but no promises on timing on that.
The text was updated successfully, but these errors were encountered:
Describe the bug
While testing a component using DataGrid I am getting the following warning:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There shouldn't be a warning.
I believe this is caused by useTubular calling useEffect() but not returning a cleanup function, so the dispatch when the API call is complete fires after the component is unmounted.
Ideally the processRequest() api could be updated to handle the return of a Future which can be canceled. I will try to put a PR together to fix this, but no promises on timing on that.
The text was updated successfully, but these errors were encountered: