- DATE:
- AUTHOR:
- PowerSync Product Team
PowerSync Web SDK <> TanStack Query Integration (Alpha)
We are excited to announce the Alpha release of PowerSync Web SDK’s integration with TanStack Query (FKA React Query), available through the @powersync/tanstack-react-query
package. This release enables developers to leverage TanStack Query’s powerful asynchronous state management features for React and React Native applications.
This package wraps TanStack’s useQuery
and useSuspenseQuery
hooks, enabling advanced async state management. Developers can now manage loading and error states more efficiently, providing smoother user experiences.
A couple of features that are worth highlighting:
React Suspense Support:
useSuspenseQuery
transforms certain loading states into Suspense signals, allowing UI transitions to remain smooth while queries are being resolved.Query Caching: Queries are cached by default, allowing subsequent page loads to reuse the same queries without refiring them. This improves app performance and reduces unnecessary network requests.
Getting started
See the package README for usage details and examples.
Resources
Help and feedback
If you need any help getting started or have any questions, chat with us on Discord. We'd also love to hear your feedback.