# Use Debouncer for store state persistence · screen/t3code-personal

[View on GitCafe](https://git.cafe/screen/t3code-personal/commit/f5e4df5cab247021501876358fd72c7196cd96b9)

Repository: [screen/t3code-personal](https://git.cafe/screen/t3code-personal)

Visibility: public

Requested revision: f5e4df5cab247021501876358fd72c7196cd96b9

Requested commit: f5e4df5cab247021501876358fd72c7196cd96b9

Commit: f5e4df5cab247021501876358fd72c7196cd96b9

Tree: ff56ab6b3b3353eb1811356510407686849c2c47

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Use Debouncer for store state persistence

- Replace manual timeout debounce logic with `@tanstack/react-pacer`'s `Debouncer`
- Persist updates via `maybeExecute` to reduce localStorage write thrashing
- Flush pending persistence on `beforeunload` to avoid losing recent state

```

## Parents

- [1f47cc6f4e51d236421d45bafabaa3bbf2576c3f](https://git.cafe/screen/t3code-personal/commit/1f47cc6f4e51d236421d45bafabaa3bbf2576c3f?format=markdown)

[Source at this commit](https://git.cafe/screen/t3code-personal/tree/f5e4df5cab247021501876358fd72c7196cd96b9?format=markdown)
