HospitalRun / hospitalrun

Monorepo that holds all of HospitalRun's v2 projects.
https://hospitalrun.io
MIT License
904 stars 335 forks source link

docs: add adr for switching from redux to react-query #404

Closed jackcmeyer closed 4 years ago

jackcmeyer commented 4 years ago

Add ADR for switching from redux to react-query.

This PR can be merged when:

fox1t commented 4 years ago

Since we use PouchDB we don't really need to "fetch remote" data. Can you elaborate on how and where we are going to use react-query?

jackcmeyer commented 4 years ago

Since we use PouchDB we don't really need to "fetch remote" data. Can you elaborate on how and where we are going to use react-query?

@fox1t: Although data fetches can be done through regular function calls to the PouchDB library, react-query is able to help provide a consistent interface for returning errors and help with loading states during async data fetching. React Query also will serve as a common interface for all async data fetches regardless of the target.

fox1t commented 4 years ago

LGTM