Implemented the `/api/[resourceType].ts` data fetching using React Query
Fixed #4
I have added React query and implemented the data fetching architecture mentioned in issue #4
src/api/[resourceType].ts
will contain all the custom hooks for the given resourceType which will implement the CRUD + Search of the resourceType.
This MR specifically implements useSearchPatient()
which has name
and id
parameters.
This is how it can be used:
const { isLoading, isError, data } = useSearchPatient(name, id);