Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IUseSignalProps<SENDER, ARGS>

Props for the UseSignal component

Type parameters

  • SENDER

  • ARGS

Hierarchy

  • IUseSignalProps

Index

Properties

children

children: (sender?: SENDER, args?: ARGS) => ReactNode

Type declaration

Optional initialArgs

initialArgs: ARGS

Initial value to use for the args, used before the signal emits a value. If not provided, initial args will be undefined.

Optional initialSender

initialSender: SENDER

Initial value to use for the sender, used before the signal emits a value. If not provided, initial sender will be undefined

Optional shouldUpdate

shouldUpdate: (sender: SENDER, args: ARGS) => boolean

Type declaration

    • (sender: SENDER, args: ARGS): boolean
    • Given the last signal value, should return whether to update the state or not.

      The default unconditionally returns true, so you only have to override if you want to skip some updates.

      Parameters

      • sender: SENDER
      • args: ARGS

      Returns boolean

signal

signal: ISignal<SENDER, ARGS>

Phosphor signal to connect to.

Generated using TypeDoc