()
| 194 | |
| 195 | @component |
| 196 | def ButtonSwapsDivs(): |
| 197 | count = Ref(0) |
| 198 | |
| 199 | async def on_click(event): |
| 200 | mount(make_next_count_constructor(count)) |
| 201 | |
| 202 | incr = html.button({"on_click": on_click, "id": "incr-button"}, "incr") |
| 203 | |
| 204 | mount, make_hostswap = _hotswap(update_on_change=True) |
| 205 | mount(make_next_count_constructor(count)) |
| 206 | hotswap_view = make_hostswap() |
| 207 | |
| 208 | return html.div(incr, hotswap_view) |
| 209 | |
| 210 | await display.show(ButtonSwapsDivs) |
| 211 |
nothing calls this directly
no test coverage detected