Skip to content

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

Notifications You must be signed in to change notification settings

Tiberriver256/react-query-dependency-injection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Query Dependency Injection

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.

How to use this repo

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. 1--dependency-injection - Learning how to use React Context as a dependency injection mechanism
  2. 2--react-query-custom-hooks - Covering how to wrap React Query into custom hooks which make consumption a bit easier.
  3. 3--react-query-dependency-injection - Covering using dependency injection within React Query custom hooks.

Technology

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published