STATE

Store

A Store is shared application state declared once in an imported module and available to every importing page or layout.

INTERACTIVE EXAMPLE

Shared preference

This page imports a persistent Store. Its value is shared across routes and restored by target-local storage after restart.

Application preference

Compact mode is enabled. Another page that imports this Store reads the same value.

dowe
store preferences persistent:true value:{ compactExamples:false }

import preferences from "@/views/store/preferences"

page SettingsPage
  Button onClick:{ set:preferences.compactExamples value:!preferences.compactExamples }
    "Toggle preference"
Rule
How to apply it

No data

There are no records to display