JSFiddle - React, Tailwind, and code Playground

HTML

<input type="radio" name="radioOption1" value="Array 1"/> Change this text

JavaScript

document.getElementsByName('radioOption1')[0].nextSibling.nodeValue = 'Text changed';