Settings API
chevron down
 

Settings API

Variable: settingsStorage

Type: LiveStorage

The Settings API provides LiveStorage that represents the companion app settings.

The settings values can be read and written by the companion application as well as the companion's settings view. Changes from the settings view will trigger events to be emitted in the companion application, and changes from the companion application will trigger events to be emitted in the settings view.

import { settingsStorage } from "settings";
settingsStorage.setItem("myKey", "myValue");
console.log(settingsStorage.getItem("myKey"));