> For the complete documentation index, see [llms.txt](https://trixtateam.gitbook.io/trixta-js-core/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trixtateam.gitbook.io/trixta-js-core/reference/saga-methods/listenfortrixtareactionresponse.md).

# listenForTrixtaReactionResponse

### Example

```typescript
export const EXAMPLE_RESPONSE = 'app/EXAMPLE_RESPONSE';
export function functionToDispatch(payload) {
  return {
    type: EXAMPLE_RESPONSE,
    payload,
  }
}
```

```javascript
import { put,takeEvery } from 'redux-saga/effects';
import { listenForTrixtaReactionResponse } from '@trixtateam/trixta-js-core';

export default function* checkReactionSaga({ meta, reactionDetails }) {
  const { reactionDetails } = payload;
  const { reactionName, roleName } = meta;

  if(reactionName === 'name of Trixta reaction'){
    yield put(functionToDispatch(reactionDetails.initial_data));
  }
}

export default function* globalSaga() {
yield takeEvery(listenForTrixtaReactionResponse({
  roleName: // name of Trixta role
  reactionName: // name of Trixta reaction
}),checkReactionSaga);
}
```

| Parameter    | Description          | Type   |
| ------------ | -------------------- | ------ |
| roleName     | Trixta role name     | string |
| reactionName | Trixta reaction name | string |
