Is rescript a good choice if I need to work a lot with DOM/Window API?
I am exploring Dom | ReScript API docs and its look kind of hard/pure for me:thinking:
Is rescript a good choice if I need to work a lot with DOM/Window API?
I am exploring Dom | ReScript API docs and its look kind of hard/pure for me:thinking:
You can bind to anything trivially, so I wouldn’t see a problem. The official bindings look fine to me (it takes a while to get used to the API docs succinctness), but if you want to start with a more JavaScript-like feel, you could bind stuff like Object | ReScript Language Manual and then add stronger typing as you see fit.
Yeah, I checked this too but it does not fill good : (
I can even write code like this
document["anything"]("mouseup", _event => {
Js.log("clicked!")
})
and there will not be autocomplete in IDE
If you are looking for existing bindings there is rescript-webapi, which does bind to a large chunk of the API, but not everything.
Yes. I did it with canvas.
Also you can use the lib: GitHub - tinymce/rescript-webapi: ReScript bindings to the DOM and other Web APIs