→ كل المشاريع

react-shared-states

بواسطة @HichemTab-tech

نشِط 64

Global state made as simple as useState, with zero config, built-in async caching, and automatic scoping.

عن هذا المشروع

React Shared States Global state made as simple as useState, with zero config, built-in async caching, and automatic scoping. Tiny, ergonomic, convention‑over‑configuration state, async function, and real-time subscription sharing for React. Global by default, trivially scoped when you need isolation, and opt‑in static APIs when you must touch state outside components. As simple as useState, as flexible as Zustand, without boilerplate like Redux. 🔥 Why this instead of Redux / Zustand / Context soup? 0 config. Just pick a key: useSharedState('cart', []). Automatic scoping: nearest SharedStatesProvider wins; omit it for global. Cross‑tree sharing via named scopes (two providers with same scopeName share data) – powerful for portals/modals/micro‑frontends. Async functions become cached shared resources via useSharedFunction (built‑in loading, error, results, reentrancy guard, manual or forced refresh). Static APIs (sharedStatesApi, sharedFunctionsApi) let you prime / read / mutate outside React (SSR, event buses, dev tools, tests). No custom store objects, reducers, actions, selectors, immer, proxies, or serialization hoops. Predictable: key + scope ⇒ value. That’s it. Install or

من ملف README الخاص بالمشروع على GitHub

النجوم
64
التفريعات
5
الرخصة
MIT
آخر تحديث
25/05/2026

أضف هذه الشارة إلى ملف README

أظهر أن مشروعك مُدرج على «صُنع في الجزائر».

Made in Algeria
[![Made in Algeria](https://www.madeinalgeria.dev/badge/react-shared-states.svg)](https://www.madeinalgeria.dev/projects/react-shared-states)

مشاريع ذات صلة