@idosgames/react
v0.2.1
Published
Shared React glue for the iDosGames host shell and modules: the client provider, status provider, live-state hooks, and a controller-context factory. Extracted from what every template used to copy-paste.
Downloads
1,283
Readme
@idosgames/react
Shared React glue for the iDosGames host shell and its composable modules — the pieces every module used to copy-paste, extracted into one package.
IDosGamesProvider/useIDosGamesClient— provide and read the one shared SDK client.StatusProvider/useStatus— a transient status line shared across the app.useUserState/useSdkEvent— live SDK state hooks (re-render on cache changes / typed events).createControllerContext<T>(name)— factory for a module's typed controller context (replaces the hand-written Provider + guardeduseContextpair each module used to write).
import {
useIDosGamesClient,
useUserState,
createControllerContext,
} from "@idosgames/react";Built for @idosgames/core and the module contract
in @idosgames/module-sdk. React is a peer
dependency. See docs/composable-modules-architecture.md for the architecture.
