Closed xudaotutou closed 1 year ago
What is App.main
here?
Try this:
let element = document->Document.getElementById("root")
let node = Webapi.Dom.Element.asNode(element)
let app = Js.Null_undefined.return(node)
App.main(app)
Thanks! It make compiling finish
let element = document->Document.getElementById("root")
switch element {
| Some(e) => {
let node = Webapi.Dom.Element.asNode(e)
let app = Js.Null_undefined.return(node)
let _ = App.main(app, ())
}
| None => ()
}
root
DOM by Webapi module, the compiler will report this bug.