JSFiddle - React, Tailwind, and code Playground
HTML
<div style="display:none" id="example"></div>
JavaScript
function addTextNode(text) {
var newtext = document.createTextNode(text),
element = document.getElementById('example');
element.appendChild(newtext);
}
function yourFunctionDataHere(){
return 'test1234';
}
addTextNode(yourFunctionDataHere());