File tree 1 file changed +4
-8
lines changed
src/py/reactpy/reactpy/core
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -572,10 +572,8 @@ class LifeCycleHook:
572
572
573
573
# --- start render cycle ---
574
574
575
- hook.affect_component_will_render(...)
576
-
577
- hook.set_current()
578
-
575
+ component = ...
576
+ await hook.affect_component_will_render(component)
579
577
try:
580
578
# render the component
581
579
...
@@ -587,13 +585,11 @@ class LifeCycleHook:
587
585
current_hook().use_state(lambda: ...)
588
586
current_hook().add_effect(COMPONENT_DID_RENDER_EFFECT, lambda: ...)
589
587
finally:
590
- hook.unset_current()
591
-
592
- hook.affect_component_did_render()
588
+ await hook.affect_component_did_render()
593
589
594
590
# This should only be called after the full set of changes associated with a
595
591
# given render have been completed.
596
- hook.affect_layout_did_render()
592
+ await hook.affect_layout_did_render()
597
593
598
594
# Typically an event occurs and a new render is scheduled, thus beginning
599
595
# the render cycle anew.
You can’t perform that action at this time.
0 commit comments