RespondToReactionComponent

React component used to respond to the latest Trixta reaction effect or response when shouldRespond is true, by dispatching the response / initialData to actionToDispatch or dispatchResponseTo props.

Please note if your reaction is a request for response, the property requestForEffect must be false

export function functionToDispatch(payload) {
  return {
    type: '',
    payload,
  }
}
import {
  RespondToReactionComponent,
} from '@trixtateam/trixta-js-core';

<RespondToReactionComponent
  roleName=""
  reactionName=""
  formData={}
  shouldRespond={false}
  actionToDispatch={functionToDispatch}
  dispatchResponseTo=""
  requestForEffect={false}
/>

Last updated