@playfast/react-native
v0.0.5
Published
<div align="center">
Readme
@playfast/react-native
The React Native host for reform. Register a scene as a root component for Expo or bare React Native.
DOM apps mount a scene into a container they own; React Native instead registers a root component. @playfast/react-native bridges that gap with a single helper that wraps the renderer-neutral Reform component — which already owns the runtime, boots, and renders the scene — in a zero-argument component you can register.
Install
bun add @playfast/react-native @playfast/react @playfast/reform effect react react-nativePeers: effect, react (^19), react-native, @playfast/reform, and @playfast/react.
Quick start
import { registerRootComponent } from 'expo'
import { Layer } from 'effect'
import { scene } from '@playfast/reform'
import { createReformRoot } from '@playfast/react-native'
import { AppShell } from './features/shell/shell.compose'
import { makeAppLayer } from './app/app.layer'
const AppScene = scene(AppShell, { provide: [makeAppLayer()] })
registerRootComponent(createReformRoot(AppScene))API
createReformRoot(scene: Scene): ComponentTypeBuilds a React Native root component that hosts scene. Register the result with Expo's registerRootComponent or AppRegistry.registerComponent. All of reform's engine, reactivity, and lifecycle behavior comes from @playfast/react underneath — this package only adapts the entry point.
The reform family
Core @playfast/reform · DOM host @playfast/react · forms @playfast/forms + @playfast/forms-react · testing @playfast/proof
License
MIT
