JSFiddle - React, Tailwind, and code Playground

HTML

<input name="newColorCode" type="radio" value="color_code_LightViolet"/>
<input name="newColorCode" type="radio" value="color_code_red"/>
<input name="newColorCode" type="radio" value="color_code_green"/>

JavaScript

$(':radio[value="color_code_green"]').attr('checked', 'checked');