getRegistry

Resolves to the device registry, the app's persistent key-value storage

import { getRegistry } from "@roku-sdk/runtime/registry";
const getRegistry: () => Promise<Registry>

Description

Resolves to the device registry, the app's persistent key-value storage.

This is the TypeScript counterpart of BrightScript's roRegistry. Data is grouped into named sections of string keys and values, and it persists across app launches and device reboots. Use it for small settings such as preferences or sign-in state. Writes can be buffered, so call flush() after important changes.

Example

const registry = await getRegistry();
registry.create("settings").write("theme", "dark");
await registry.flush();

What’s Next

Did this page help you?