Skip to content

epeters3/react-context-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Context Cache

A pair of components CacheProvider and CacheConsumer that leverage the React Context API, allowing you to easily store, update, and consume asynchronously retrieved data in your React application. No state container needs to be connected to components, and the data does not need to be passed through the React component tree one level at a time. Access, refresh, and add to your app's global state easily from within any of the components in your app's tree.

Basic Usage

npm i react-context-cache
import { CacheProvider, CacheConsumer } from "react-context-cache";

CacheProvider and CacheConsumer are React components that can be used like a regular React Context.Provider and Context.Consumer component pair.

About

A React Context/Provider pair for easily managing global state in a React app

Resources

Stars

Watchers

Forks

Packages

No packages published