-
Hey everyone, really enjoying React Query, so thanks everyone being involved here. Our team maintains an AngularJS app (yup, the very first one 🥲) which we are migrating to React. We use ngReact to render React components as AngularJS directives. Because of this, we can not upgrade to React 18 and need to stay on React 17 for now. Eventually, we will upgrade but this probably requires a fork of ngReact. I am currently upgrading from React Query v3 to v4. While upgrading, I noticed some "React state updates on an unmounted component" errors, similar to #3804. (I know, the React error was removed in React 18 but we can not upgrade at the moment.) I then re-read this blog post which says:
In some cases, moving the We still use angular-ui-router for navigation. With some workarounds, we are able to use inside our React components. In certain cases, we are navigating in I would have loved to create an example on how to reproduce it but our use case is so specific and would need a whole AngularJS app including React. I am fine with keeping the
I know that our case is special and I do not expect a fix from React Query side, this is why I just started a discussion. Very thankful for any hints or thoughts! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think it's possible that something timing related has changed. Specifically, we've had problems with The warning itself is not crucial. We removed our |
Beta Was this translation helpful? Give feedback.
I think it's possible that something timing related has changed. Specifically, we've had problems with
useSyncExternalStore
and our own microtask batching, so we had to change that slightly. For React17, we use the shim foruseSyncExternalStore
and I'm not sure how that works in detail.The warning itself is not crucial. We removed our
isMounted
ref check because that workaround is worse than the warning (which, as you know, was removed in v18)