title: State of Dynamically Generated Radio Buttons
body: <p>I'm trying to pass a class only to the checked radio button in my component, but with my existing code all the radio buttons receive the class. Any advice?</p>
  <pre><code>export default function RadioGroup({options}){
    
    const [isChecked, setIsChecked] = useState(false);
    
    return(
      &lt;&gt;
        {options.map(option =&gt; {
          return (
            &lt;Radio
              radioID={option.id}
              radioName={name}
              radioLabel={option.label}
              radioClass={` ${isChecked ? &quot;bg-blue&quot; : &quot;&quot;}`}
              onChange={() =&gt; setIsChecked((prev) =&gt; !prev)}
            /&gt;
          )
        })}
      &lt;/&gt;
    );
  }
  </code></pre>