@phreshos/react
v0.1.28
Published
Runtime-neutral React adapters for PhreshOS contracts.
Downloads
4,878
Maintainers
Readme
@phreshos/react
Runtime-neutral React adapters for PhreshOS contracts.
Documentation · Runtime model · Source
Role
The React SDK adapts explicitly supplied Core contracts and live sources to React providers and hooks. It does not initialize a transport, import the Client SDK, access the browser, define domain state, or render visual language.
SystemProvider, ContextProvider, and DesktopProvider preserve the
separation between the global System, current Client Context, and containing
Desktop. State and subscription hooks preserve unresolved state and own only
their React lifecycle.
Installation
| Package manager | Command |
| --- | --- |
| npm | npm install @phreshos/react |
| pnpm | pnpm add @phreshos/react |
| Bun | bun add @phreshos/react |
| Yarn | yarn add @phreshos/react |
@phreshos/core and react are peer dependencies.
import {
ContextProvider,
DesktopProvider,
SystemProvider,
} from "@phreshos/react"
<SystemProvider system={system}>
<DesktopProvider desktop={desktop}>
<ContextProvider context={context}>{children}</ContextProvider>
</DesktopProvider>
</SystemProvider>See React SDK for providers, state hooks, and subscription hooks.
Development
bun install --frozen-lockfile
bun run verifyverify checks the contracts, tests the adapters, builds the package, and
validates its published shape.
check performs static checks, build creates distributable output, and test
runs Vitest assertions from tests/. Run build before testing built artifacts.
verify runs check, build, and test in order. Operational tooling belongs
in scripts/; tests and their fixtures belong in tests/. Verification uses
the committed dependency graph without local package substitutions.
Related repositories
@phreshos/coreowns every contract accepted by these adapters.@phreshos/clientsupplies Client runtime values without becoming a dependency of this package.@phreshos/react-uiowns reusable visual components and Appearance interpretation.- PhreshOS System composes these adapters in the Desktop.
Contributing
See CONTRIBUTING.md for the repository workflow and SECURITY.md for private vulnerability reporting.
License
Licensed under the MIT License. Copyright © 2026 Zohayr SLILEH.
