> 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/hooks/reactions/userespondtoreactioneffect.md).

# useRespondToReactionEffect

React hook used to interact with a Trixta reaction that does not require a response for a given roleName. Will trigger the callBack when a reaction is received.

{% code overflow="wrap" %}

```tsx
import { useRespondToReactionEffect } from '@trixtateam/trixta-js-core';
const { 
hasRoleAccess,
} = useRespondToReactionEffect<TInitialData>({ 
  roleName:"",
  reactionName:"",
  callBack: (payload?: TInitialData) => {},
  debugMode: false,
   });
```

{% endcode %}

### Options

* `roleName : string`
  * **Required**
  * Trixta role name

* `reactionName : string`

  * **Required**
  * Trixta reaction name

* `debugMode: boolean`

  * Optional
  * Defaults to false.
  * If set to `true`, enables Trixta console debugging

* `callBack : (payload: TInitialData) => void`

  * **Required**
  * This function will fire any time a reaction is received from Trixta.

### Returns

* `hasRoleAccess : boolean`

  * Will be `true` if the `roleName` has access for this user.
