class LocationList extends Shadow { list = [] render() { VStack(() => { this.list.forEach((update) => { console.log(update.name) HStack(() => { p(update.timestamp) p(update.name) p(update.latitude) p(update.longitude) }) .gap(1, em) }) }) .gap(0.5, em) .paddingLeft(5, em) .paddingTop(2, em) .onEvent("update-location", (e) => { console.log("location received: ", e.detail) this.list.unshift(e.detail) this.rerender() }) } } window.register(LocationList)