Lumen.Reconciler libraryclient
Part of Lumen
The reconciler of Lumen: it mounts a tree of elements into a panel, creating a vgui panel
for every intrinsic element and rendering every component, and later brings the panels in
line with a new tree, updating the props of the panels that are still there, creating the
ones that are new and removing the ones that are gone. Elements of a list are matched by
their key prop, or by their position when they have none. Components whose state changes
are rendered again on the next frame, and only their part of the tree is reconciled.
local root = Lumen.mount(Lumen.element(Lumen.component('help')), parent_panel)
root:update(Lumen.element(Lumen.component('help'), { page = 'credits' }))
root:unmount()
Summary
Functions
Functions
Renders the components whose state has changed since the last frame and runs the effects that follow. Runs by itself on the frame after a change; call it to apply changes at once.
Checks whether a render is pending.
Returns
- Boolean
Queues an effect to run once the current render has been committed.
Parameters
- instance Map the component instance the effect belongs to
- slot Map the hook slot of the effect
Marks a component for a render on the next frame. Called when its state changes.
Parameters
- instance Map component instance