Skip to content

Optimize connectedCallback with Promise.resolve for deferred rendering in FazElement #160

@piraz

Description

@piraz

Refactor the connectedCallback method in FazElement (faz/src/element.ts) to defer rendering and state updates using Promise.resolve(). This ensures all child custom elements are upgraded before rendering, preventing layout shifts and flashes of unstyled content. This change results in smoother, more stable component initialization, especially on pages with many custom elements.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions