Answer the question
In order to leave comments, you need to log in
Custom radio buttons in react?
Good afternoon! Please tell me how to make custom radio buttons?
The project on react , you can use lodash or via createSelector
The radiobuttons are already laid out, the only problem is how to show the selected radiobutton.
An array of objects comes, and in the object it is necessary to change the property enabled: true
, respectively, in another object, this property must be replaced by false
.
The question is how best to write this implementation?
Answer the question
In order to leave comments, you need to log in
{radios.map(radio => (
<Radio
key={radio.value}
enabled={radio.value === this.state.value}
>
{radio.label}
</Radio>
))}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question