API Reference

IStateEventListenerinterface

Keyed callback listener contract used by subscribeStateEvents(...) for direct (context, index) state and context-rebind notifications.

Quick facts
Kind
interface
Members
4
Package
@rs-x/core

Declaration

export interface IStateEventListener {
  onStateChange: (change: IStateChange) => void;
  onContextChanged: (change: IContextChanged) => void;
  onStartChangeCycle?: (cycle: IChangeCycleIndex) => void;
  onEndChangeCycle?: (cycle: IChangeCycleIndex) => void;
}

Import

import type { IStateEventListener } from '@rs-x/state-manager';

Members

4 members in this interface.

onContextChanged
property
onContextChanged: (change: IContextChanged) => void

Type

(change: IContextChanged) => void

onEndChangeCycle?
propertyoptional
onEndChangeCycle?: (cycle: IChangeCycleIndex) => void

Type

(cycle: IChangeCycleIndex) => void

onStartChangeCycle?
propertyoptional
onStartChangeCycle?: (cycle: IChangeCycleIndex) => void

Type

(cycle: IChangeCycleIndex) => void

onStateChange
property
onStateChange: (change: IStateChange) => void

Type

(change: IStateChange) => void