ReScript seems to be a better way to write JS code, but I am not able to find what should be a simple single line of docs.
How do I call functions like document.createElement()
?
I tried Js.document, Dom.document, by looking at this page: https://rescript-lang.org/docs/manual/latest/api, but that code gives an error in the playground:
The value
document
can't be found in Js
The valuedocument
can't be found in Dom