Constructs a new ViewManager instance.
Private
currentThe view currently being processed.
Private
dirtyArray of views whose state is dirty and needs to be updated.
Private
layoutMap of view IDs to views with invalidated layouts.
Private
layoutArray of views whose layout is invalid and needs to be recalculated.
Private
viewsSet of views that currently have errors.
Processes all dirty views and views with invalidated layouts, applying state changes and laying out children as needed.
Clears the list of views with errors.
Registers a control (view) with an error for debugging purposes.
The error object containing debug information.
The view associated with the error. If not provided, uses the current view.
Unregisters a control (view) from error tracking.
The view to unregister.
The
ViewManager
class is responsible for managing the state and layout of views. It keeps track of dirty views and views with invalidated layouts, and processes them during each tick.