Setup
Release control is on by default inside theLerixProvider from
Installation, with the built-in screens.
Set release so update rules can compare versions:
main.tsx
What users see
- Maintenance: a fixed overlay above everything on the page, with Try again. The rest of the page can’t be clicked or focused.
- Required update: the page reloads by itself to load the newest deployment, at most once every 5 minutes per tab. If it is still out of date, a full-screen message stays with a Reload button.
- Optional or recommended: a bar at the bottom of the page with Update (reloads), Later and, when allowed, Skip this version.
Your own screens
SetappControl: { ui: false } and use useLerixAppControl(). It returns
the whole state, its parts update, maintenance and sdk (each null
when nothing applies, fields in
The state), and the helpers.
The component re-renders when the state changes.
release-gate.tsx
With
ui: false there is no automatic reload for a required update: call
openStore() from your own button.