# \<sp-radio-group\> React issues – onChange vs. onInput vs. onClick

**URL:** <https://forums.creativeclouddeveloper.com/t/sp-radio-group-react-issues-onchange-vs-oninput-vs-onclick/3109>\
**Category:** Photoshop\
**Created:** [June 17, 2021, 8:10am UTC](https://forums.creativeclouddeveloper.com/t/sp-radio-group-react-issues-onchange-vs-oninput-vs-onclick/3109 "2021-06-17T08:10:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [June 17, 2021, 3:58pm UTC](https://forums.creativeclouddeveloper.com/t/sp-radio-group-react-issues-onchange-vs-oninput-vs-onclick/3109/2 "2021-06-17T15:58:23Z")

</div>

Yeah, this is some strange handling by React. React won’t wire up certain events like `change` automatically for controls that look like web components (which `sp-radio-group` _et al_ look like), which means that to listen for it properly you’ll need to wrap it (the `WC` component in the samples works fine here).

For `onInput` and `onClick`, it does seem that React will wire up those events (I’m not sure why it makes an exception here), but as you’ve noticed, you get notifications for everything underneath, and further `onClick` is being fired whenever you click _anywhere_ in the `sp-radio-group` (expected, since the user _did_ click within its bounds).

It does appear that if you use `evt.currentTarget.value`, you’ll see the correct value (even though the handler fires multiple times). If you’re just treating this as a controlled element, that may be fine. If you’re doing a lot of work each time the handler is called, that might be a problem.

In general, though, the most straightforward way to mix React & Spectrum UXP is to use a wrapper like `WC` and handle the events there.

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/sp-radio-group-react-issues-onchange-vs-oninput-vs-onclick/3109)._
