You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should set async=false for all relationships (see reference below). Since we are using decorators, an easy way would be just to define custom @hasMany and @belongsTo decorators that do this by default and import them in place of the ember-decorators decorators.
Having a guarantee that writing post.get('comments') in JavaScript or {{post.comments.length}} in Handlebars won't trigger any side effects is a big benefit for developers – synchronous templates and computed properties are straightforward and predictable. And if they do forget to load something, instead of having the template's rendering pass try to do it for them, the developer would just see missing data and go load it explicitly themselves somewhere, perhaps in a route or a component hook using an Ember Concurrency task.
We should set
async=false
for all relationships (see reference below). Since we are using decorators, an easy way would be just to define custom@hasMany
and@belongsTo
decorators that do this by default and import them in place of theember-decorators
decorators.Reference: https://embermap.com/notes/83-the-case-against-async-relationships
The text was updated successfully, but these errors were encountered: