Skip to content

v0.3.13-preview.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 19 Feb 10:52
· 9 commits to main since this release
3b23a40
refactor: migrate marketplace SDK react hooks to TanStack Query (#284)

* refactor: migrate marketplace SDK react hooks to TanStack Query

Replace custom useMarketplaceClientQuery/useStableValue/deepEqual
with @tanstack/react-query's useQuery, gaining:
- Automatic cache deduplication and stale-while-revalidate
- Built-in error/loading states (isSuccess, isError, isPending)
- Query key-based invalidation via marketplaceKeys factory
- Full TanStack Query options passthrough (staleTime, gcTime, etc.)

Breaking changes:
- Hook return types are now UseQueryResult<T, Error> instead of custom
  UseMarketplaceQueryResult<T>
- Second argument is now queryOptions object instead of boolean enabled
- Removed: deepEqual, useStableValue (handled by TQ key serialization)

New exports:
- marketplaceKeys: query key factory for external invalidation
- useInvalidateMarketplace / useInvalidateCollection: invalidation helpers

Updated consumer: marketplace-balances-fetcher.ts adapted to new API.

* docs: update marketplace SDK docs and example for TanStack Query

- Update README.md React section with TanStack Query patterns
- Document QueryClientProvider setup requirement
- Document queryOptions second argument (replaces boolean enabled)
- Document marketplaceKeys factory and invalidation helpers
- Update UseQueryResult return type references
- Update marketplace-react.tsx example

* fix: format marketplace-balances-fetcher

* fix: remove unused imports and fix TanStack Query status value

- Remove unused FetchTokenBalancesResult and UseQueryResult imports
- Fix status comparison: 'loading' → 'pending' (TanStack Query v5)