Skip to main content
For what release control does and how to set rules in the dashboard, read Release control.

Setup

Release control is on by default inside the LerixNextProvider from Installation, with the built-in screens. Set the release at build time so update rules can compare versions:
.env.production
Use a version with digits, such as 1.4.0, not a commit SHA. Without a release, update rules never apply on the web. Maintenance mode works either way, unless a window is limited to certain versions. To change the defaults, pass appControl in the provider’s options:
app/layout.tsx

What users see

The same screens as in React: a maintenance overlay with Try again, a required update that reloads the page at most once every 5 minutes and then shows a Reload button, and a dismissible bar for optional or recommended updates.

Your own screens

Set appControl: { ui: false }, then use useLerixAppControl() from a client component. It works as in React.
components/release-gate.tsx
Put ReleaseGate inside LerixNextProvider in your root layout, around {children}.