Open pyronaur opened 8 months ago
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
When using the useMutation hook in a custom hook that is used in multiple components, the mutation status is not shared between those components: https://github.com/TanStack/query/issues/2304
I've addressed that for
useDatasyncAction
here: https://github.com/Automattic/jetpack/pull/35962But this is still an active problem in
useDataSync
However, @thingalon pointed out that this may not be an issue - depending on how we want to deal with this, and perhaps we should maintain feature parity with react-query here.
I think we're going to need a way to listen to shared mutations. So even if we do revert
useDataSyncAction
fix, we still need a more streamlined way to listen in on global mutations state.Either way - the current situation is not great, because it's neither here nor there. Mutations right now are inconsistent in DataSync.