Module @just-web/preferences

@just-web/preferences

NPM version NPM downloads

@just-web/preferences plugin defines the interface of get and set user preferences.

Where the preferences are saved depends on how it is implemented in the details.

You will need one of the following plugin, or create your own:

  • @just-web/browser-preferences: Save preference in browser local storage.
  • 🚧 @just-web/service-preferences: Save preference in a remote service.

Install

# npm
npm install @just-web/preferences

# yarn
yarn add @just-web/preferences

# pnpm
pnpm install @just-web/preferences

#rush
rush add -p @just-web/preferences

Usage

import { createApp } from '@just-web/app'
import commandsPlugin from '@just-web/commands'
import keyboardPlugin from '@just-web/keyboard' // optional
import preferencesPlugin from '@just-web/preferences'
import browserPreferencesPlugin from '@just-web/browser-preferences'

const app = createApp({ name: 'your-app' })
.extend(commandsPlugin())
.extend(keyboardPlugin())
.extend(preferencesPlugin())
.extend(browserPreferencesPlugin())

Index

Type Aliases

Functions

Generated using TypeDoc