Skip to content

Commit 85a2aad

Browse files
author
Robert Jackson
authored
Point to ember-data-storefront instead of ember-cached-shoe (#718)
Point to ember-data-storefront instead of ember-cached-shoe
2 parents 60eeeba + d5b2e5a commit 85a2aad

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,24 +380,24 @@ export default Ember.Route.extend({
380380

381381
Shoebox gives you great capabilities, but using it in the real app is pretty rough. Have you ever thought that such kind of logic should be done behind the scenes? In a large codebase, defining `fastboot.isFastboot` conditionals can be a daunting task. Furthermore, it generates a lot of boilerplate code, which obscures the solution. Sooner or later coupling with `shoebox` will spread over all routes.
382382

383-
That's why [ember-cached-shoe](https://www.npmjs.com/ember-cached-shoe) was born.
383+
Fortunately, there is an addon called [ember-data-storefront](https://embermap.github.io/ember-data-storefront/) that can help to alleviate this pain, thanks to its Fastboot mixin: https://embermap.github.io/ember-data-storefront/docs/guides/fastboot.
384384

385-
After installing and applying it, your routes can look like this:
385+
After installing the addon and applying the mixin, your routes can look like this:
386386

387387
`app/routes/my-route.js`:
388388

389389
```javascript
390-
import Ember from 'ember'
390+
import Route from '@ember/routing/route';
391391

392-
export default Ember.Route.extend({
392+
export default Route.extend({
393393
model() {
394394
// first call in a server makes actual ajax request.
395395
// second call in a browser serves cached response
396396
return this.store.findAll('posts')
397397
}
398398
})
399399
```
400-
And they still take advantage of caching in the `shoebox`. No more redundant AJAX for already acquired data. Installation details are available in the addon [README](https://github.com/appchance/ember-cached-shoe#ember-cached-shoe).
400+
And they still take advantage of caching in the `shoebox`. No more redundant AJAX for already acquired data. Installation details are available in the addon [documentation](https://embermap.github.io/ember-data-storefront/docs).
401401

402402
### Rehydration
403403

0 commit comments

Comments
 (0)