Migrate from v2 to v3 (beta)
Ignite Element v3 keeps the default Ignite JSX renderer and headless runtime from v2, and adds a cleaner install surface, a view-first context, and a narrower public API. Most app code that uses ignite-element and one state adapter upgrades with just the install change.
- Install the beta:
pnpm add ignite-element@beta(plus the one state library you use). - State libraries (
xstate,redux,@reduxjs/toolkit,mobx) andlit-htmlare now optional peers — install only what you use. - Use the canonical view context:
view: ({ snapshot }) => …; object snapshot fields are no longer spread onto the callback argument. - The removed
ignite-element/config/*andignite-element/renderers/*subpaths are no longer part of the public API.
1) Install the beta
Section titled “1) Install the beta”pnpm add ignite-element@beta xstate# pnpm add ignite-element@beta @reduxjs/toolkit # Redux# pnpm add ignite-element@beta mobx # MobXignite-element now depends on the scoped packages @ignite-element/core, @ignite-element/adapters, and @ignite-element/renderer. They install automatically as dependencies — you don’t add them yourself, and your imports stay ignite-element and ignite-element/<adapter>.
2) Optional peer dependencies
Section titled “2) Optional peer dependencies”In v3 the state libraries and lit-html are declared as optional peer dependencies. Installing ignite-element@beta xstate no longer pulls in Redux, MobX, Redux Toolkit, or lit, and you won’t see “unmet peer” warnings for the adapters you don’t use. lit-html is only needed if you opt into the lit render strategy — the default Ignite JSX renderer requires no renderer dependency.
Selecting lit is now config-free: install lit-html, import @ignite-element/renderer/lit, and author lit-html templates — Ignite auto-detects them and renders with lit. You no longer set renderer: 'lit' in ignite.config.ts just to use lit (it remains the way to force one renderer project-wide). See Rendering.
3) Canonical view context
Section titled “3) Canonical view context”The facade view(...) callback now receives a single { snapshot } argument. Read adapter-specific state through that snapshot:
// v2 / early v3 betaview: ({ context, transport }) => ({ status: context.status, connected: transport.state === "connected",});
// v3view: ({ snapshot }) => ({ status: snapshot.context.status, connected: snapshot.transport.state === "connected",});ViewContext<Snapshot> is exactly { snapshot: Snapshot }. XState and Actor-Web state live under snapshot.context; Redux and MobX state are the snapshot itself.
4) Narrower public API
Section titled “4) Narrower public API”v3 locks the stable public surface to the root entrypoint, the adapter entrypoints (ignite-element/xstate, /redux, /mobx, /actor-web), and the JSX entrypoints. The following are no longer public:
- The
ignite-element/config/*andignite-element/renderers/*subpaths. - Root exports for config loaders, renderer-strategy registration, global style mutation, and factory internals.
If an advanced app still needs shared shadow styles or renderer diagnostics, import the underlying @ignite-element/renderer primitives directly in app-owned code. For the default Ignite JSX path you need none of this.
Verify
Section titled “Verify”- Reinstall and run a TypeScript check (
pnpm exec tsc --noEmit). - Confirm only your chosen state library is installed (
npm ls xstate redux mobx). - Smoke-test a component per Your first component.