about summary refs log tree commit diff
path: root/src/lib/react-query.ts
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2023-11-16 22:01:01 +0000
committerGitHub <noreply@github.com>2023-11-16 14:01:01 -0800
commit8475312422579c2c7d2798fcd0ff58009c366690 (patch)
treea2576ed4e7766aac25d16a74ef802866786ea12e /src/lib/react-query.ts
parent54faa7e176ed2f8644ef4941c8a65522107a84c1 (diff)
downloadvoidsky-8475312422579c2c7d2798fcd0ff58009c366690.tar.zst
Add a mutation queue to fix race conditions in toggles (#1933)
* Prototype a queue

* Track both current and pending actions

* Skip unnecessary actions

* Commit last confirmed state to shadow

* Thread state through actions over time

* Fix the logic to skip redundant mutations

* Track status

* Extract an abstraction

* Fix standalone mutations

* Add types

* Move to another file

* Return stable function

* Clean up

* Use queue for muting

* Use queue for blocking

* Convert other follow buttons

* Don't export non-queue mutations

* Properly handle canceled tasks

* Fix copy paste
Diffstat (limited to 'src/lib/react-query.ts')
0 files changed, 0 insertions, 0 deletions