JSFiddle - React, Tailwind, and code Playground

HTML

<span>Do you want to ask any question?</span>
<label for="chkYes">
    <input type="radio" id="chkYes" name="chkQstn" />
    Yes
</label>
<label for="chkNo">
    <input type="radio" id="chkNo" name="chkQstn" />
    No
</label>
<hr />
<div id="dvqstn" style="display: none">
    Ask Here:
    <input type="text" id="txtQuestion" />
</div>

JavaScript

$(function () {
        $("input[name='chkQstn']").click(function () {
            if ($("#chkYes").is(":checked")) {
                $("#dvqstn").show();
            } else {
                $("#dvqstn").hide();
            }
        });
    });