I am calling react component from html using jQuery like below code
$(document).ready(function(){
const display = $("#check").prop("checked");
if(display){
$("#myWidget").attr("display", display);
}
});
<div class="form-group">
<div class="checkbox">
<label><input type="checkbox" value="test" id="check"</label>
</div>
</div>
<react-comp display="display" id="myWidget" style="flex:1"/>
Is it the right way to call react component? Do we have another way apart from jquery and pure document object?