Skip to main content

Query

npm

The @bonfhir/query package contains a series of hooks meant to manage FHIR data fetching in a react and react-native application.

React Query

It heavily relies on the Tanstack Query (React Query) v5 library.
If you are not familiar with this library, I strongly suggest you go ahead and read the Overview first - it will greatly help.

With this library, you don't need to worry about fecthing strategies, cache invalidation, data freshness, loading / error cycles, and all those pesky details that are hard to get right. You just use the provided hooks, and the library normalize the React Query cache for you.