Options
All
  • Public
  • Public/Protected
  • All
Menu
interface

State

description

This interface defines the configuration of an individual card's data and state discovery. Cards map directly to Vuex getters, actions and/or mutations.

In case an individual state entry depends on the result of another state entry, you can use the waitFor property as an array such that the software will first request data with this/these getter(s).

example

Using the State interface

  const config = {
waitFor: [],
getter: "account/info",
};

// using the interface directly
const state = config as State;

// or using a state factory
const state = createState(config);



Properties

param waitFor

The vue-router path definition, e.g. "/game-leaderboard". (Optional)

param getter

The schema identifier, this is a kebab-case formatted name, e.g. "game-leaderboard". (Optional)

param mutation

The state configuration. This is optional to read datasets from the backend. (Optional)

param action

The layout type used for the homepage of this module, e.g. "flex" or "grid". (Optional)

param formatters

The display formatter(s) that are used before dataset(s) are being displayed. (Optional)

since

v0.1.0

Hierarchy

  • State

Index

Properties

action?: string
formatters?: FormattersConfig

The display formatter(s) that are used before dataset(s) are being displayed. These formatters transform input in a consistent way across all cards of a schema instance.

i.e. if you want to display the pretty format of an address given its' raw format, you would register here a formatter for the value type address that refers to the "format-address-pretty" formatter.

var

{FormattersConfig}

getter?: string
mutation?: string
waitFor?: string[]

Generated using TypeDoc