React.useEffect1(()=>{
let timeout = Js.Global.setTimeout(()=>{
let vaall = ReactDOM.querySelector(“#txt”)
Js.log2(“vall”,vaall)
let _= vall->Js.String2.split(%re(“/[\n,]/”))
setData([…data, …vaall.split(/[\n,]/)]);
},1000)
if nwcount == 0 {
Js.Global.clearTimeout(timeout)
}
None
Hi All,
Getting same issue. Could someone help in knowing how to use document.getElementById for DOM manipulation to get the element from HTML code using Id.
It looks like @spyder has taken control of rescript-webapi? (congrats)
Its not super approachable, but its not much less approachable than the underlying API if you know what you’re trying to do.
Yes, we haven’t announced it yet but the big project I was working on was cancelled so I convinced the company to hand the repository to me. I and one of the other developers were already the primary contributors after we forked it from bs-webapi.
The lack of docs and “getting started” guidance is something it could use help with for sure. It can offer a lot of benefit, and save a lot of time from people writing their own bindings, if used correctly. The examples are actually a much better place to start than the docs right now:
With the right set of open statements at the top, it becomes quite natural to write document->getElementById("foo").