stack state working (when top-level parent)
This commit is contained in:
@@ -52,20 +52,22 @@ window.testSuites.push( class testState {
|
||||
|
||||
render() {
|
||||
VStack(() => {
|
||||
let asd = this.state.logs.length * 2
|
||||
p("hi")
|
||||
.fontSize(asd, vw)
|
||||
this.state.logs.forEach((log) => {
|
||||
p(log)
|
||||
})
|
||||
})
|
||||
.onAppear(() => {
|
||||
this.state.logs = ["one", "two"]
|
||||
this.state.logs.push("one")
|
||||
this.state.logs.push("two")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
register(Home, randomName("home"))
|
||||
window.Home()
|
||||
|
||||
if(!($("p").style.fontSize === "4vw")) return "state did not update!"
|
||||
}
|
||||
|
||||
if(!$("p")) return "no p's rendered"
|
||||
if($$("p")[0].innerText !== "one") return "state did not update!"
|
||||
if($$("p")[1].innerText !== "two") return "state did not update!"
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user