react-scoped-model

Scoped Model pattern in React (but with Hooks)

Usage no npm install needed!

<script type="module">
  import reactScopedModel from 'https://cdn.skypack.dev/react-scoped-model';
</script>

README

react-scoped-model

Scoped Model pattern in React (but with Hooks)

NPM JavaScript Style GuideOpen in CodeSandbox

Features

  • Contextual State: Inject state into your component tree.
  • Composition: Write states as if you are writing components, use React Hooks to compose state logic.
  • Granular control: Only watch updates you need, not when the whole state updates.

Install

npm install --save react-scoped-model
yarn add react-scoped-model

Documentation

License

MIT © lxsmnsyc