copy-on-write-store

0.0.1-0 • Public • Published

react-copy-write

goat

An immutable React state management library with a simple mutable API, memoized selectors, and structural sharing. Powered by Immer.


Installation

react-copy-write requires React 16.3 or later, as it depends on the new React.createContext API.

yarn add react-copy-write

Usage

react-copy-write exports a function which takes your base state and returns an object with the Provider and Consumer components, along with a few other utility methods.

import createState from 'react-copy-write'
 
const UserState = createState({
  user: null,
  loggedIn: false,
});

Readme

Keywords

none

Package Sidebar

Install

npm i copy-on-write-store

Weekly Downloads

0

Version

0.0.1-0

License

MIT

Unpacked Size

164 kB

Total Files

8

Last publish

Collaborators

  • aweary