Access data from the server-side initial state API within apps.
npm i -S @nextcloud/initial-state
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