# Adding Custom Event Handlers to Module React Components

**URL:** <https://forum.inductiveautomation.com/t/adding-custom-event-handlers-to-module-react-components/98048>\
**Category:** Module Development\
**Created:** [November 1, 2024, 3:37pm UTC](https://forum.inductiveautomation.com/t/adding-custom-event-handlers-to-module-react-components/98048 "2024-11-01T15:37:52Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [November 4, 2024, 5:26pm UTC](https://forum.inductiveautomation.com/t/adding-custom-event-handlers-to-module-react-components/98048/8 "2024-11-04T17:26:31Z")

</div>

> [@Jason\_Zhou](#):
>
> bind functions

Don't worry about this.

> [@Jason\_Zhou](#):
>
> provide custom event handling for a custom component

1. In your `ComponentDescriptor`, [set the events](https://github.com/Kyvis-Labs/ignition-apexcharts-module/blob/acf1ff23815d28bcf4db598f19d82cdbb67534f6/common/src/main/java/com/kyvislabs/apexcharts/common/component/display/ApexChart.java#L59) that you would like to trigger. This is also what makes the events appear in the designer.  
There are some [other threads](https://forum.inductiveautomation.com/t/creating-a-component-event/30403/16) on the forum about what should be in the event's `*.props.json` file.
2. In your client component, [fire the events](https://github.com/Kyvis-Labs/ignition-apexcharts-module/blob/acf1ff23815d28bcf4db598f19d82cdbb67534f6/web/packages/client/typescript/components/ApexChart.tsx#L528) using `props.componentEvents.fireComponentEvent(eventName, eventObject)`. The corresponding event will be triggered on the gateway when it's received.

---

_[View the full topic](https://forum.inductiveautomation.com/t/adding-custom-event-handlers-to-module-react-components/98048)._
