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

Remove need for @tracked on getters #213

Merged
merged 1 commit into from Sep 26, 2019
Merged

Conversation

tomdale
Copy link
Contributor

@tomdale tomdale commented Sep 25, 2019

This change aligns the Glimmer.js @tracked implementation with Ember, where further improvements to the design have been made.

In particular, values consumed through templates (as represented by References) now participate in the autotracking system. This removes the need for annotating getters with the @tracked decorator. Instead, getters become "tracked" automatically as a by-product of accessing tracked properties during their execution.

As of this change, applying @tracked to a getter will produce an error message with instructions to remove the decorator.

This change aligns the Glimmer.js @Tracked implementation with Ember, where further improvements to the design have been made.

In particular, values consumed through templates (as represented by References) now participate in the autotracking system. This removes the need for annotating getters with the @Tracked decorator. Instead, getters become "tracked" automatically as a by-product of accessing tracked properties during their execution.

As of this change, applying @Tracked to a getter will produce an error message with instructions to remove the decorator.
@tomdale tomdale merged commit 86f4ab1 into master Sep 26, 2019
@rwjblue rwjblue deleted the remove-tracked-computed branch September 26, 2019 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants