class LogTable extends Shadow { state = { logs: [] } render() { VStack(() => { this.state.logs.forEach((log) => { HStack(() => { p(log.time) p(log.ip) p(log.host) p(log.path) .maxWidth(50, vw) }) .gap(1, em) }) }) .onAppear(async () => { let logs = await ServerClient.send("GET") this.state.logs = logs }) .onEvent("log", (e) => { console.log(e.detail) this.state.logs.push(e.detail) console.log(this.state.logs) }) } } register(LogTable)