JSFiddle - React, Tailwind, and code Playground
JavaScript
const makeThing = () =>{
const thing = document.createElement('div');
return thing;
}
const d = {}
d.element = makeThing();
document.body.appendChild(d.element);
document.body.removeChild(d.element)
d.element = null;
console.log('after,',d.element);