File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/py/reactpy/reactpy/core Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -572,10 +572,8 @@ class LifeCycleHook:
572572
573573 # --- start render cycle ---
574574
575- hook.affect_component_will_render(...)
576-
577- hook.set_current()
578-
575+ component = ...
576+ await hook.affect_component_will_render(component)
579577 try:
580578 # render the component
581579 ...
@@ -587,13 +585,11 @@ class LifeCycleHook:
587585 current_hook().use_state(lambda: ...)
588586 current_hook().add_effect(COMPONENT_DID_RENDER_EFFECT, lambda: ...)
589587 finally:
590- hook.unset_current()
591-
592- hook.affect_component_did_render()
588+ await hook.affect_component_did_render()
593589
594590 # This should only be called after the full set of changes associated with a
595591 # given render have been completed.
596- hook.affect_layout_did_render()
592+ await hook.affect_layout_did_render()
597593
598594 # Typically an event occurs and a new render is scheduled, thus beginning
599595 # the render cycle anew.
You can’t perform that action at this time.
0 commit comments