Improve ergonomics for observedAttributes/liveAttributes in Class mode #1

Open
opened 2026-01-07 15:10:11 +00:00 by endeavorance · 0 comments
Owner

This is not bad when using the factory, but when extending the Component class directly, you need to specify names of attributes in two places for reactive behavior to work properly.

The primary issue is avoiding the use of a MutationObserver (slower than observedAttributes) while still having type safety on liveAttributes which is a class property and not a static property so that it can access the class state shape generic.

This is not bad when using the factory, but when extending the Component class directly, you need to specify names of attributes in two places for reactive behavior to work properly. The primary issue is avoiding the use of a MutationObserver (slower than observedAttributes) while still having type safety on liveAttributes which is a class property and not a static property so that it can access the class state shape generic.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rusticarcade/palette#1
No description provided.