@lerix-dev/lerix-core. Using React, Next.js or
Angular? See React,
Next.js or
Angular. For what release control does
and how to set rules in the dashboard, read
Release control.
Setup
Release control is on by default, with the built-in screens. Setrelease
so update rules can compare versions:
main.ts
Maintenance mode works without
release, unless the window is limited to
certain versions.
What users see
- Maintenance: a fixed overlay above everything on the page. The rest of the page can’t be clicked or focused, and focus stays inside the overlay. Try again checks right away.
- Required update: the SDK reloads the page to load your newest
deployment, at most once every 5 minutes per tab (tracked in
sessionStorage). If the page is still out of date after the reload, a full-screen message stays with a Reload button. Clicking Reload always reloads; only the automatic reload is limited. This keeps a stale cache or CDN from causing a reload loop. - Optional or recommended: a bar at the bottom of the page with Update (reloads), Later and, when allowed, Skip this version. It appears once per tab session, shortly after the page has loaded.
@lerix-dev/lerix-core/app-control-ui), so they cost nothing until
something must show. They follow the locale option, or the browser’s
language: English, or Arabic right to left.
How web apps hear about changes
Web pages don’t receive silent push. The SDK checks on load, when the tab becomes visible again or the browser comes back online (if the saved answer is older than 5 minutes), and every minute while the tab is visible during an emergency. See Delivery and offline behaviour.Your own screens
SetappControl: { ui: false }, then read the state with getState() and
follow changes with subscribe(). The state has update, maintenance and
sdk, each null when nothing applies (fields in
The state).
release-gate.ts
Check now
refresh() ignores the saved answer’s lifetime, fetches, and resolves with
the new state.
With ui: false there is no automatic reload for a required update: call
openStore() from your own Reload button.