()
| 22 | |
| 23 | @reactpy.component |
| 24 | def SomeComponent(): |
| 25 | count, incr_count = use_counter(0) |
| 26 | return reactpy.html._( |
| 27 | reactpy.html.p({"data_count": count, "id": "count"}, "count", count), |
| 28 | reactpy.html.button( |
| 29 | {"on_click": lambda e: incr_count(), "id": "incr"}, "incr" |
| 30 | ), |
| 31 | ) |
| 32 | |
| 33 | async def get_count(): |
| 34 | # need to refetch element because may unmount on reconnect |
nothing calls this directly
no test coverage detected