@just-web/preferences v7.2.6
@just-web/preferences
@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.
This package provides a memoryPreferencesGizmo that stores preferences in memory.
But in practice, most likely you should use a different implementation such as:
- @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/preferencesUsage
Here is how to use memoryPreferencesGizmo:
import { justApp } from '@just-web/app'
import { commandsGizmoFn } from '@just-web/commands'
import { keyboardGizmoFn } from '@just-web/keyboard' // optional
import { memoryPreferencesGizmo } from '@just-web/preferences'
const app = await justApp({ name: 'your-app' })
.with(commandsGizmoFn())
.with(keyboardGizmoFn())
.with(memoryPreferencesGizmo)
.create()2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago