ChangeScreenState

Moves the screen this event lives in to another stateinitialState (its loading state), failureState (its failure state), or successState with the content to display. For success, the content comes from the data passed to successState when set, otherwise from incomingData, which must then be a ScreenModel — typically the one produced by a preceding GetScreen. Dispatches onSuccess (no data) when the state was applied; onFailure (no data, logged) when applying it throws, including a success state with no declared data and no ScreenModel in incomingData.

Parameters

id

Unique identifier of this event. Defaults to a random id.

trigger

Trigger that fires this event, built via EventTriggers.

events

Child events chained after this one, wired to its triggers (onSuccess, onFailure).

state

Target screen state, built with initialState, failureState or successState.