MCPcopy Index your code
hub / github.com/reactive-python/reactpy / SomeComponent

Function SomeComponent

src/py/reactpy/tests/test_client.py:24–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

use_counterFunction · 0.90
use_stateMethod · 0.80

Tested by

no test coverage detected