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

Function _update_life_cycle_state

src/py/reactpy/reactpy/core/layout.py:678–687  ·  view source on GitHub ↗
(
    old_life_cycle_state: _LifeCycleState,
    new_component: ComponentType,
)

Source from the content-addressed store, hash-verified

676
677
678def _update_life_cycle_state(
679 old_life_cycle_state: _LifeCycleState,
680 new_component: ComponentType,
681) -> _LifeCycleState:
682 return _LifeCycleState(
683 old_life_cycle_state.id,
684 # the hook is preserved across renders because it holds the state
685 old_life_cycle_state.hook,
686 new_component,
687 )
688
689
690_LifeCycleStateId = NewType("_LifeCycleStateId", str)

Callers 1

Calls 1

_LifeCycleStateClass · 0.85

Tested by

no test coverage detected