Guides
Remote config
Change app behaviour without a release using typed values.
Remote config lets you change simple application values without shipping a new version. Think of it as a typed settings file your app downloads.
Value types
| Type | Example |
|---|---|
string | support@example.com |
number | 1500 |
boolean | false |
json | { "columns": 2 } |
Reading config
const config = await unit.config.get()
config.maintenance_mode // false
config.delivery_fee // 1500
config.home_layout // { columns: 2 }Common patterns
Maintenance mode
if (config.maintenance_mode) {
return <MaintenanceScreen />
}Minimum app version
Store minimum_app_version as a string and compare it against the installed version at launch to prompt for an update.
Note
Config is delivered to every user of an environment. For per-user targeting, wait for the targeting rules on the roadmap.