@trigger

@trigger is used to trigger when effect or state dispatch fires

@trigger(action, options?)

// The action name will be `{sink}/{effect|state}`
type action = string

interface options {
  // trigger excution order, default 0
  priority?: number;
  // lazy loaded trigger will excute after action, default true
  lazyLoad?: boolean;
  // pass raw action object to trigger function, default false
  rawAction?: boolean;
  // formatter use to arguments before it hits trigger function
  formatter?: Function;
}

Last updated

Was this helpful?