PROVIDER-FREE SHARED STATE

Shared state,drawn to spec.

A tiny external store with the mental model of useState. Define a keyed module once, then read, select, and update it from any React or React Native surface.

N-01 / INSTALL
npm install @raulpesilva/re-state
Exploded technical view of createReStateMethodsOVERALL API SPAN / 05 SURFACESFACTORY HEIGHT / 01 CALLKEYSTORETYPESSTATE IDENTIFIER'counter'EXTERNAL STOREINITIAL VALUE / 0INFERRED MODULENO PROVIDERFRONT ELEVATIONSIDE ELEVATIONSCALE05 APIOUTPUT ASSEMBLYCREATE RE-STATE METHODS01useCounterHOOK02useCounterSelectSELECTOR03dispatchCounterACTION04getCounterGETTER05resetCounterRESETASSEMBLY NOTEALL SURFACES SHARE ONE KEYED STORE.
PROJECTRE-STATE / SHARED STATE SYSTEM
DRAWINGCOBALT EXPLODED
SHEETA-01
REV1.2.33
RUNTIMEREACT / REACT NATIVE
ARCHITECTUREEXTERNAL KEYED STORE
PROVIDERNOT REQUIRED
LICENSEMIT

Operating principles

OPERATING DETAIL01

No provider

Import a hook and share a key. There is no context tree to wrap or maintain.

OPERATING DETAIL02

Read or write anywhere

Hooks inside React; typed dispatchers and getters in every other module.

OPERATING DETAIL03

One API, every surface

React DOM, React Native, Expo, Windows, macOS, ESM, and CommonJS.

A DELIBERATELY SMALL SURFACE

Start small.Scale by composition.

ENTRY POINTS
03
COMPOSITION
UNBOUNDED
CONSTRUCTION SET01

APPROVED FOR IMPLEMENTATION

Your first shared state is one minute away.

Follow the installation plan, define a key, and start importing the generated API.
NEXT DRAWING / I-01Open installation plan