I was a little confused the other day when I began receiving an error that seemed to be about ReactJS, however, I was writing a non-react typescript file at the time.
Error: “Refers to a value, but is being used as a type here”
What I eventually realised, was that while it wasn’t a React component file, it was using one. I’d decided that it was the file in which I would add a root node to the DOM to attach the React app too.
my-file.ts
import MyReactApp from 'my-react-app';
const rootEl = bodyEl.createEl("div");
this.root = createRoot(rootEl);
this.root.render(
<MyReactApp/>
);
