Closed
Description
This is similar to #324 but specifically focused on the Layout
and LifeCycleHook
since those will be the most complex to refactor. I'm not really sure what the interface would ultimately look like - whether there would still be a layout with render
and dispatch
methods, or if those would be functions accepting some sort of LayoutState
instead. Maybe a bit like:
with layout_context(component) as layout:
old_state, new_state = await render(layout)
diff = compute_diff(old_state, new_state)
await dispatch_event(layout)
You could take a similar approach to hooks as well, but just applying functions to objects containing state.
Metadata
Metadata
Assignees
Labels
No labels