JSFiddle - React, Tailwind, and code Playground
HTML
<div id="reportArea">
</div>
JavaScript
var area = document.querySelector("#reportArea");
area.innerHTML = ""; // remove content
var reportPlacement = document.createElement("div");
reportPlacement.id = "reportPlace";
area.appendChild(reportPlacement);
var report = d3.select("#reportPlace");
report.data([1, 2, 3])
// as is, this works. 1 will appear in the newly created div (#reportPlace)
// if you uncomment the next line, 1 disappears. 2 & 3 appear not in the div but after the closing body tag
//.enter()
.append("div")
.text(String);