Closed deepakjois closed 8 years ago
If you don't provide onChange
, you'll receive the warning that the handler's not set, because the library allows only controlled components for now. Maybe we should implement uncontrolled components, but that gets slightly messy.
I just created a PR that allows both the "onChange" and "selectedValue" properties to be optional. If neither property is specified, then React will treat the radio buttons as uncontrolled components.
Fixed by #22
If I do no specify an onChange handler, for e.g.
I get an error:
Does the onChangeHandler need to be set. Can’t the React element maintain its own state, and update it when the value changes.