Skip to content

Commit 72df10f

Browse files
chrisrngMinThaMie
authored andcommitted
blog(embertimes204): Ember Resources Release (#1221)
* blog(embertimes204): Ember Resources Release * lint fix * Update the-ember-times-issue-204.md Co-authored-by: Anne-Greeth Schot-van Herwijnen <[email protected]>
1 parent eba9f14 commit 72df10f

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

content/the-ember-times-issue-204.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Deprecation of Ember array prototype extensions 🧹,
1919
Watch the movies 🎞,
2020
Evolving Ember’s Major Version Process ⭕
2121
Announcing the Official TypeScript Types Public Preview 🔥
22+
Ember Resources Release 🎉
2223
<SOME-INTRO-HERE-TO-KEEP-THEM-SUBSCRIBERS-READING>
2324

2425
---
@@ -103,15 +104,19 @@ Note there is a known issue when using the `@types/ember-data` packages which ar
103104

104105
---
105106

106-
## [🐹 6. Section title in sentence case](section-url)
107+
## [Ember Resources Release 🎉](https://twitter.com/nullvoxpopuli/status/1568694246521319424)
107108

108-
<change section title emoji>
109-
<consider adding some bold to your paragraph>
110-
<add the contributor in the post in format "FirstName LastName (@githubUserName)" linked to their GitHub account>
111-
<please include link to external article/repo/etc in paragraph / body text, not just header title above>
109+
[Thomas Gossmann (@gossi)](https://github.com/gossi) together with [NullVoxPopuli (@NullVoxPopuli)](https://github.com/NullVoxPopuli) released a new version of [ember-resources](https://github.com/NullVoxPopuli/ember-resources), an addon that implements the [Resource pattern](https://ember-resources.pages.dev/#what-is-a-resource). The new release starting in [v5.4.0](https://github.com/NullVoxPopuli/ember-resources/releases/tag/v5.4.0) adds the "owner" (app/engine instance) to function-based resources so now resources can access services, or whatever else is in the registry.
112110

113-
<add your name to author list, top and bottom>
114-
<add short title to "SOME-INTRO-HERE">
111+
```js
112+
const myResource = resource(({ on, owner }) => {
113+
let foo = owner.lookup('service:foo');
114+
115+
return () => foo.someValue;
116+
});
117+
```
118+
119+
Try it out today by [installing](https://ember-resources.pages.dev/#installation) it in your app!
115120

116121
---
117122

0 commit comments

Comments
 (0)