Skip to content

ashkan-pm/react-context-module-pattern

Repository files navigation

React Context Module Pattern

Example of using the "Context Module" pattern for handling asynchronous tasks and data. This repository implements the following:

  • Reusable useAsync hook inspired by Kent C. Dodds and popular libraries such as Alibaba's useRequest hook to perform async logic
  • Context module responsible for exposing a useful API to handle asynchronous state and data
  • Examples for using these components
  • Strictly typed using TypeScript