Setup
Release control is on by default inside theLerixNextProvider from
Installation, with the built-in screens.
Set the release at build time so update rules can compare versions:
.env.production
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
SetappControl: { ui: false }, then use useLerixAppControl() from a client
component. It works as in React.
components/release-gate.tsx
ReleaseGate inside LerixNextProvider in your root layout, around
{children}.