3 ms·
for things like loading state with ember we use a library called ember-concurrency that uses the generator approach. It's very nice! Example you can create som
by holler 6y ago
for things like loading state with ember we use a library called ember-concurrency that uses the generator approach. It's very nice!
Example you can create some "task" (promise-like), then in a template you have automatic access to it's state so e.g.
```
{{#if this.fetchStoriesTask.isRunning}}
loading...
{{else}}
<span>Loaded 10 Stories</span>
{{/if}}
```
https://github.com/machty/ember-concurrency https://github.com/machty/ember-concurrency
- mnutt 6y agoember-concurrency is probably at the top of the list for things I miss most when writing javascript outside of ember.