re-state
Getting Started

Development and examples

This page is for contributors and anyone who wants to run the repository locally. If you only want to use re-state in an application, the installation guide is all you need.

Work in the repository

The repository uses pnpm. From its root, install dependencies and run the checks:

pnpm install
pnpm check
pnpm examples:check

pnpm check runs formatting, linting, TypeScript, tests, and the library build. pnpm examples:check runs the checks provided by each example without launching a native device or desktop build.

Run an example

The examples use the local package through the pnpm workspace:

ExampleStart commandPlatform
vite-jspnpm --filter vite-js devReact and Vite
vite-tspnpm --filter vite-ts devReact, Vite, and TypeScript
nextjspnpm --filter nextjs devNext.js App Router
expopnpm --filter expo-example startExpo and React Native
react-native-windowspnpm --filter ReStateWindows startReact Native Windows
react-native-macospnpm --filter ReStateMacOS startReact Native macOS

The Windows and macOS examples also provide windows and macos scripts for native builds. Those commands require the platform toolchain described in each example's README.

On this page