Using React Query, React Context, Custom Hooks, and Typescript to make easy-to-use easy-to-test code for consuming an API in your React application.
This repo is a training resource for stepping through how to set up a wrapper around an API using React Query and dependency injection via React Context.
The learning modules are split up into separate git branches. Each module builds on the learnings of the previous module. The README.md will change for each branch explaining the concept and will have working code you can inspect.
The modules are:
1--dependency-injection
- Learning how to use React Context as a dependency injection mechanism2--react-query-custom-hooks
- Covering how to wrap React Query into custom hooks which make consumption a bit easier.3--react-query-dependency-injection
- Covering using dependency injection within React Query custom hooks.