jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

[DataSync] No Mutation Shared State

Open pyronaur opened this issue 1 year ago • 1 comments

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/35962

But 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.

pyronaur avatar Feb 27 '24 07:02 pyronaur

This issue has been marked as stale. This happened because:

  • It has been inactive for the past 6 months.
  • It hasn’t been labeled `[Pri] BLOCKER`, `[Pri] High`, `[Type] Feature Request`, `[Type] Enhancement`, `[Type] Janitorial`, `Good For Community`, `[Type] Good First Bug`, etc.

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.

github-actions[bot] avatar Aug 26 '24 00:08 github-actions[bot]