Interface IUseSignalProps<SENDER, ARGS>

Props for the UseSignal component

Type Parameters

  • SENDER

  • ARGS

Hierarchy

  • IUseSignalProps

Properties

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

Type declaration

initialArgs?: ARGS

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

initialSender?: SENDER

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

shouldUpdate?: ((sender, args) => boolean)

Type declaration

    • (sender, 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: ISignal<SENDER, ARGS>

Phosphor signal to connect to.

Generated using TypeDoc