# React + GraphQL Custom Card \> Add editing components in HubSpot

**URL:** <https://community.hubspot.com/t/react-graphql-custom-card-add-editing-components-in-hubspot/116483>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, professional\
**Created:** [September 17, 2024, 1:54pm UTC](https://community.hubspot.com/t/react-graphql-custom-card-add-editing-components-in-hubspot/116483 "2024-09-17T13:54:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pietro-Poli](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pietro-poli/32/76836_2.png) [@Pietro-Poli](https://community.hubspot.com/u/Pietro-Poli)\
**Post date:** [September 17, 2024, 1:54pm UTC](https://community.hubspot.com/t/react-graphql-custom-card-add-editing-components-in-hubspot/116483/1 "2024-09-17T13:54:48Z")

</div>

Hi!  
I’m working on a react + graphQl Custom Card.  
I’ve 3 different object related A → B and B → C  
Into the view I attached I can list all B objects related do A and all C objects related to each B object.  
Now I need to edit some fields, in B objects and C objects.  
I would like to use a component like one with green arrow.  
Is it possible?

 ![1042064_1_Screen.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/a/a98bcd02298628c0cef2d43b5d794c915073e5cc.jpeg)

---

<div class="post-metadata">

**Author:** ![KhushbooP11](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/khushboop11/32/8252_2.png) [@KhushbooP11](https://community.hubspot.com/u/KhushbooP11)\
**Post date:** [September 18, 2024, 12:06pm UTC](https://community.hubspot.com/t/react-graphql-custom-card-add-editing-components-in-hubspot/116483/2 "2024-09-18T12:06:38Z")

</div>

Hi [@Pietro-Poli-](https://community.hubspot.com/t5/user/viewprofilepage/user-id/141065),

Yes, you can add editing components in a React + GraphQL custom card. Here’s how you can achieve this,

1. You can use controlled form components (like input, select, etc.) in React to enable editing. Each component can hold the values of the B or C objects you want to edit.

2. When a field is edited, trigger a mutation via your GraphQL API to update the relevant fields in the B or C objects.

3. To improve user experience, you can implement optimistic updates so the UI reflects changes immediately, even before the mutation completes.

In summary, use React form components for editing and GraphQL mutations to update the data on the backend.

I hope it helps, let me know if you need to [talk](https://calendly.com/khushboo-pokhriyal/30min?month=2024-08)!

Khushboo Pokhriyal

Growth & Operations

GroRapid Labs

[LinkedIn |](https://www.linkedin.com/in/khushboopokhriyal)9315044754 | [Email |](mailto:khushboo.pokhriyal@grorapid.com)[Website](https://www.grorapidlabs.com/)

---

<div class="post-metadata">

**Author:** ![Pietro-Poli](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pietro-poli/32/76836_2.png) [@Pietro-Poli](https://community.hubspot.com/u/Pietro-Poli)\
**Post date:** [September 18, 2024, 7:19pm UTC](https://community.hubspot.com/t/react-graphql-custom-card-add-editing-components-in-hubspot/116483/3 "2024-09-18T19:19:41Z")

</div>

Hi Khushoboo,  
today I’ve found these source:

> **[CRM data components - HubSpot docs](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-components/crm-data-components/overview)**
>
> Learn about the CRM data component for use in UI extensions.

> **[CRM action components - HubSpot docs](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensions/ui-components/crm-action-components/overview)**
>
> Learn about CRM action components for use in UI extensions.

I’ve tested them and _et voilà_ it works like I want.

😃
