Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink @observe #170

Open
iccir opened this issue Mar 7, 2023 · 0 comments
Open

Rethink @observe #170

iccir opened this issue Mar 7, 2023 · 0 comments
Milestone

Comments

@iccir
Copy link
Member

iccir commented Mar 7, 2023

@observe was too complex. In practice, we only used @observe(after=) and almost exclusively called a single "sync properties to the DOM" method.

For now, we can safely refactor this functionality into @property via a change= attribute:

@property (change=_updateContent) title : String

Eventually, I'd like to have a simple observe attribute:

@property (observe) title : String

This would call propertyDidChange/observePropertyChange/etc in setTitle:. From there, implementation-specific methods like setNeedsUpdate or setNeedsLayout could be called.

iccir added a commit that referenced this issue Mar 8, 2023
iccir added a commit that referenced this issue Mar 9, 2023
iccir added a commit that referenced this issue Mar 12, 2023
@iccir iccir added this to the 3.0 milestone Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant