Skip to content
PhreshOSPublic

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

@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 verify

verify 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

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.

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages