Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/reactive-python/reactpy
/ use_counter
Function
use_counter
src/py/reactpy/tests/tooling/hooks.py:13–15 ·
view source on GitHub ↗
(initial_value)
Source
from the content-addressed store, hash-verified
11
12
13
def
use_counter(initial_value):
14
state, set_state = use_state(initial_value)
15
return
state,
lambda
: set_state(
lambda
old: old + 1)
Callers
2
SomeComponent
Function · 0.90
HasScript
Function · 0.90
Calls
1
use_state
Function · 0.90
Tested by
2
SomeComponent
Function · 0.72
HasScript
Function · 0.72