Reactant ShareRun one app across tabs and workers

Build modular
React apps.

Put state and behavior in injectable modules. Connect them to React views or sync them across browser tabs with Reactant Share.

pnpm dlx reactant-cli init my-app
Live in your browser
counter.ts
@injectable({ name: 'counter' })
class Counter {
  @state count = 0;

  @action
  add(step: number) {
    this.count += step;
  }
}
Live previewReactant + React 18

Loading the live example…

Inside a Reactant app

An application layer for React

Modules hold state and behavior, dependency injection wires them together, and views stay small enough to read at a glance.

Architecture

Every layer has one job

Views stay thin, services own the logic, and one store applies every change. Each layer depends only on the layers below it.

Reactant Share

One app, every tab

Reactant Share runs your app once, in a SharedWorker or a host tab, and renders it in every window. Clients send actions to that one instance, and each change reaches all of them together.

Get started

Build your next app with Reactant

Create a Vite project with the CLI, in TypeScript by default, or add Reactant to an existing React 18 app.

Terminal
pnpm dlx reactant-cli init my-app
cd my-app
pnpm start