Skip to content

feat: add loading states and error handling to usePools hook#470

Merged
Mimah97 merged 1 commit into
Vatix-Protocol:mainfrom
Jessepriase:feat/loading-states-usepools-hook
Jun 30, 2026
Merged

feat: add loading states and error handling to usePools hook#470
Mimah97 merged 1 commit into
Vatix-Protocol:mainfrom
Jessepriase:feat/loading-states-usepools-hook

Conversation

@Jessepriase

Copy link
Copy Markdown
  • Add error state to usePools in usePoolTicks.ts for graceful error handling
  • Add isStale state to indicate when data is from mock/cache
  • Change initial loading state from false to true for accurate loading UX
  • Add cache: 'no-store' to prevent stale cached responses
  • Add isStale property to usePools.ts (React Query version)
  • Update PoolSelector to show error message and cached indicator
  • Add comprehensive tests for usePools loading states and error handling

Summary

Related issue

  • Closes #

Type of change

  • Bug fix
  • New feature
  • Docs update
  • Chore / refactor

Checklist

- Add error state to usePools in usePoolTicks.ts for graceful error handling
- Add isStale state to indicate when data is from mock/cache
- Change initial loading state from false to true for accurate loading UX
- Add cache: 'no-store' to prevent stale cached responses
- Add isStale property to usePools.ts (React Query version)
- Update PoolSelector to show error message and cached indicator
- Add comprehensive tests for usePools loading states and error handling
@Mimah97 Mimah97 merged commit 6bf6331 into Vatix-Protocol:main Jun 30, 2026
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.

Loading states on usePools hook

2 participants