Class: Main

Main~Main(…components)

The main application class, which manages application state, communicates application state between component classes, and initializes component classes.

Constructor

new Main(…components)

Instantiates the method class, creates a proxy for the message instance, defines a setter trap for the message proxy, then sets the class components property.

Parameters:
Name Type Attributes Description
components Object <repeatable>

The classes for which to pass the message proxy into and conditionally initialize. The order in which they are passed is meaningful, depending on which component states a given class depends on for its reactive behavior.

Source:

Members

components

Sets the initial application state for the provided component.

Source:

state

Holds the states of application components as processed by the message proxy.

Source:

Methods

introspect(object, property, value)

For debugging and monitoring message proxy setter behavior.

Parameters:
Name Type Description
object Object

The setter sender.

property string

The message property set.

value Object

An object containing the sender component, that component's property to notify other components about, and value related to that property.

Source:

notify(object, property, value)

Calls the receive method for all application components.

Parameters:
Name Type Description
object Object

The sender component.

property string

The name of the sender property.

value number | string | boolean | Object

The value of the sender property.

Source: