Skip to content

feat: implement React Query caching strategy#937

Merged
Xoulomon merged 2 commits into
Xoulomon:mainfrom
Mirabliss:perf/react-query-caching-strategy
May 30, 2026
Merged

feat: implement React Query caching strategy#937
Xoulomon merged 2 commits into
Xoulomon:mainfrom
Mirabliss:perf/react-query-caching-strategy

Conversation

@Mirabliss
Copy link
Copy Markdown
Contributor

  • Add @tanstack/react-query@5.80.7 dependency
  • Add queryClient.ts with staleTime constants: GROUP_STATE: 30_000ms for infrequently-changing group data CONTRIBUTION_STATUS: 0 (always fresh) for payment state
  • Add queryKeys.ts with centralised key factory
  • Rewrite useGroup, useGroups, useContributions with React Query
  • Add usePrefetchGroup hook for hover-based prefetching
  • Add QueryClientProvider to main.tsx
  • Add prefetch-on-hover to GroupCard via onMouseEnter

Summary

Motivation

Closes #

Type of change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • refactor — code restructuring, no behaviour change
  • test — tests only
  • chore — build, deps, tooling
  • perf — performance improvement
  • Breaking change (existing behaviour changes)

Changes

Testing

Smart contract:

cargo test -p stellar-save

Frontend:

cd frontend && npm test run

Manual steps (if applicable):

Checklist

  • cargo fmt run (Rust changes)
  • cargo clippy -- -D warnings passes (Rust changes)
  • npm run lint passes (frontend changes)
  • Tests added or updated for new/changed behaviour
  • CI is green
  • Documentation updated (if behaviour changed)
  • No secrets or .env files staged

Screenshots / recordings

closes #895

- Add @tanstack/react-query@5.80.7 dependency
- Add queryClient.ts with staleTime constants:
  GROUP_STATE: 30_000ms for infrequently-changing group data
  CONTRIBUTION_STATUS: 0 (always fresh) for payment state
- Add queryKeys.ts with centralised key factory
- Rewrite useGroup, useGroups, useContributions with React Query
- Add usePrefetchGroup hook for hover-based prefetching
- Add QueryClientProvider to main.tsx
- Add prefetch-on-hover to GroupCard via onMouseEnter
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@Mirabliss Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Xoulomon Xoulomon merged commit 71f97aa into Xoulomon:main May 30, 2026
13 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Performance] Implement React Query caching strategy

2 participants