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

Async Observers #494

Merged
merged 5 commits into from
Jun 20, 2019
Merged

Async Observers #494

merged 5 commits into from
Jun 20, 2019

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented May 30, 2019

@GavinJoyce
Copy link
Member

GavinJoyce commented May 31, 2019

Thanks for working on this @pzuraq.

I like that this RFC allows apps that currently use some observers to incrementally move away from them while incrementally moving to the Octane programming model at the same time.

Am I correct in saying that this RFC will allow addons like ember-composable-helpers migrate away from detecting argument changes using synchronous observers to using arguments which are tracked properties? And specifically, should it then be possible for helpers like sort-by to detect the type of arguments received and only use observers when the inputs are not tracked properties?

@pzuraq
Copy link
Contributor Author

pzuraq commented May 31, 2019

I would take it a step further actually, I believe helpers like sort-by will be able to convert and remove observers even if the properties they are passed are normal CPs or properties updated using set, since autotracking works with those too 😄 helpers and computed properties like Ember's own sortBy helper or the ones included in ember-macro-helpers should be able to update too. I believe the majority of, in not all, cases where sync observers are absolutely necessary can be solved with autotracking.

text/0000-async-observers.md Outdated Show resolved Hide resolved
text/0000-async-observers.md Outdated Show resolved Hide resolved
@snewcomer
Copy link
Contributor

snewcomer commented Jun 5, 2019

Pleasure reading this RFC! Would you mind explaining autotracking @pzuraq? Any links to some code I can look at to explain? I look to help updating some of these packages in the future.

@pzuraq
Copy link
Contributor Author

pzuraq commented Jun 5, 2019

I think the best explanation for the moment is in the Tracked Properties RFC. At some point I want to do a bit of a deeper dive in a blog post, but it's going to take a while to write, so I'm unsure when I'll get around to it. Hopefully sooner rather than later!

@richard-viney
Copy link
Contributor

The "Rendered" link needs updating as it's pointing to https://github.com/emberjs/rfcs/blob/async-observers/text/0000-async-observers.md but the 0000 here needs to be 0494.

@rwjblue
Copy link
Member

rwjblue commented Jun 7, 2019

We discussed this in todays core team meeting, and are 👍 on moving into final comment period.

@rwjblue
Copy link
Member

rwjblue commented Sep 23, 2019

FYI - Updated the rendered link above.

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.

5 participants