Skip to content

Conversation

@AliceR
Copy link
Member

@AliceR AliceR commented Oct 23, 2025

Close #25

Opening as draft for visibility. Still need to migrate useItem, useStacApi and useStacSearch!

- Refactor useCollections and the closely related useCollection hooks to
   use TanStack Query for caching and fetching
- Improve error propagation, keep original loading states
- Update StacApiProvider to manage QueryClient and support custom clients
- Clarify peer dependency requirements for @tanstack/react-query in README
   and docs/react-query-setup.md
- Update ESLint config and package.json for new dependencies
- Minor fixes to context and tests for compatibility
@AliceR AliceR requested a review from ifsimicoded October 23, 2025 17:04
- Expose QueryClient on window for integration with TanStack Query DevTools (browser extension)
- Documented alternative: TanStack Query Devtools floating/embedded component (see https://tanstack.com/query/latest/docs/framework/react/devtools)
- Chose browser extension to keep project dependencies clean and offload devtools responsibility to the developer
- Refactor useItem to use TanStack Query for caching and fetching
- Improve error propagation, keep original loading states
Adds an ItemDetails component to the example app, showing how to use the
useItem hook to fetch and display STAC item details.
Improves documentation for consumers of stac-react.
- Refactor useStacApi to use TanStack Query for fetching and caching
- Add QueryClientProvider to wrapper to ensure a clean instance for every test
- Refactor useStacSearch.test.ts to use setupStacSearch helper for all tests, adding a step to wait for IDLE stacApi
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.

2 participants