Skip to content
brix.v2 stable

Search documentation

70 guides

Documentation menu
Docs / Getting started / Application typesRead Markdown ↗

Integrate an external React host

Adopt an independently generated React host into a Brix workspace and add Brix bindings without replacing its build system.

Integrate an existing external React host

An independently generated or hosted React application can remain external while the workspace owns installation:

brix workspace adopt apps/admin --dry-run
brix workspace adopt apps/admin
brix workspace integrate react apps/admin --dry-run
brix workspace integrate react apps/admin

Adoption records brix.project: "external" and retains the host's scripts and framework configuration. React integration installs @brix/react from the same immutable Git tag as core Brix, aligns React and ReactDOM, and records brix.integrations.react: true. It does not convert the host into a managed React application or replace its build system.

Use @brix/react for hooks and runtime bindings after integration. Keep browser mounting and build setup under the external host's ownership unless its bundler can deliberately consume the adapter's subpaths. Preview first: adoption and integration are transactional, but existing files may make the plan invalid.

Verify

For a managed React application:

brix doctor
brix check
brix test
brix build
brix verify

In a workspace, append #customer-portal for a focused lifecycle command. React components use their application's React test toolchain; Brix's brix/test/browser renderer and managed Storybook are Preact-only.

See environment configuration, workspaces, and CLI commands for deployment-specific setup.