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

Method _create_layout_update

src/py/reactpy/reactpy/core/layout.py:160–176  ·  view source on GitHub ↗
(
        self, old_state: _ModelState
    )

Source from the content-addressed store, hash-verified

158 return update_task.result()
159
160 async def _create_layout_update(
161 self, old_state: _ModelState
162 ) -> LayoutUpdateMessage:
163 new_state = _copy_component_model_state(old_state)
164 component = new_state.life_cycle_state.component
165
166 async with AsyncExitStack() as exit_stack:
167 await self._render_component(exit_stack, old_state, new_state, component)
168
169 if REACTPY_CHECK_VDOM_SPEC.current:
170 validate_vdom_json(new_state.model.current)
171
172 return {
173 "type": "layout-update",
174 "path": new_state.patch_path,
175 "model": new_state.model.current,
176 }
177
178 async def _render_component(
179 self,

Callers 2

_serial_renderMethod · 0.95
_schedule_render_taskMethod · 0.95

Calls 3

_render_componentMethod · 0.95
validate_vdom_jsonFunction · 0.90

Tested by

no test coverage detected