lxsmnsyc/scoped-model ↗
Created Dec 23, 2020 · View the lxsmnsyc/scoped-model repository page
Contextual state management for React, ReasonReact and Preact
Want this for your repo?
Render a free sample of any GitHub repo in seconds.
Contributors
3
Lines of Code
3,255
From
Nov 4, 2019
To
Dec 23, 2020
About lxsmnsyc/scoped-model
Scoped-model is a contextual state management library for React, Preact, and ReasonReact. It provides a lightweight alternative to global state management solutions by enabling localized, scoped state that can be accessed by components within a defined context. The library uses React hooks and context APIs to manage state, making it straightforward to integrate into modern component-based applications.
The project is organized as a monorepo with separate packages tailored to different frameworks. The main offerings include react-scoped-model for React applications, preact-scoped-model for Preact, and re-scoped-model for ReasonReact. An additional package, react-scoped-model-swr, extends the core functionality with integration for data fetching patterns. Each package includes example implementations to help developers get started quickly.
The library is designed for developers seeking a simpler, more granular approach to state management compared to Redux or MobX, particularly useful in applications where certain state only needs to be available to a specific component subtree rather than globally. The project is written in TypeScript and distributed under the MIT license.