stack state working (when top-level parent)

This commit is contained in:
metacryst
2025-12-26 05:54:27 -06:00
parent eb6975c7de
commit 12bb5346e8
2 changed files with 42 additions and 53 deletions

View File

@@ -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!"
}
})