tim-smart / tim-smart/effect-atom
Optimistic Updates
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 792
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
I like the reactivity pattern, but can I run a mutation that may return the same shape as some query and just bypass the query fetching call?
Basically:
getUser RPC returns User
updateUser RPC returns User
I want to just update instead of invalidate and refetch without having to sync another atom.
I'm used to TanStack query and want to try this but want Stale Queries and Optimistic Updates
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the existing query and mutation behavior described in this issue, including how query fetching and invalidation currently work. Determine the intended behavior for a mutation returning the same shape as a query, including optimistic updates and stale-query handling; the issue is done when this flow works without requiring a separate atom.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100