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

Function SecondComponent

src/py/reactpy/tests/test_core/test_layout.py:967–971  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

965
966 @reactpy.component
967 def SecondComponent():
968 second_used_state.current = use_state("second")[0]
969 # reset state after unmount
970 use_effect(lambda: lambda: second_used_state.set_current(None))
971 return html.div()
972
973 async with reactpy.Layout(Root()) as layout:
974 await layout.render()

Callers 1

RootFunction · 0.85

Calls 3

use_stateFunction · 0.90
use_effectFunction · 0.90
set_currentMethod · 0.45

Tested by

no test coverage detected