Options
All
  • Public
  • Public/Protected
  • All
Menu

@nextcloud/initial-state

@nextcloud/initial-state

Build Status npm Documentation

Access data from the server-side initial state API within apps.

Installation

npm i -S @nextcloud/initial-state

Usage

import { loadState } from '@nextcloud/initial-state'

const val = loadState('myapp', 'user_preference')

Note: loadState throws an Error if the key isn't found, hence you might want to wrap the call with a try block.

Generated using TypeDoc