๐ Emberistas! ๐น
Ember 3.20 Launched ๐,
a sequence of weblog posts on ember-modifer and its internals ๐,
detect when Ember parts enter or depart the viewport ๐,
a weblog submit and RFC on Ember.Element ๐,
and final, however not least, doc Ember apps with Docfy ๐!
A brand new Ember.js weblog submit is as much as announce the discharge of model 3.20 of Ember.js, Ember Knowledge and Ember CLI!
3.20 contains a number of new options for the ecosystem.
- In Ember.js, the
{{in-element}}
helper is accessible as public API. This helper solves rendering challenges equally toember-wormhole
andember-elsewhere
. It permits rendering content material right into a vacation spot elsewhere on a web page. - Ember Knowledge explicitly helps the mixed use of
EmbeddedRecordsMixin
andJSONAPISerializer
by way of theisEmbeddedRecordsMixinCompatible
property. - Ember CLI permits syncing Blueprints when operating
npx ember-cli-update
, which avoids some potential points that beforehand existed when operating this movement. Take a look at the associated RFC to study extra.
In Ember.js, Meta.prototype.setSourceDestroyed
and Meta.prototype.setSourceDestroying
are actually deprecated. There have been no deprecations for Ember Knowledge. Ember CLI points a warning for utilizing Node 13 and deprecates using the PACKAGER
experiment.
For extra data, give the Ember.js weblog submit a learn.
Have you ever been seeking to get began with ember-modifier in your Ember.js functions?
Raja SK (@RajaSK05) wrote a sequence of weblog posts on Ember modifiers.
How do Ember Modifiers get to be managed internally? ๐ฅผ
In continuation of his first weblog submit reusable DOM conduct in React vs Ember, Raja wrote a second submit detailing the ember-modifier internals and what an component modifier supervisor is. He begins by speaking concerning the modifier lifecycle strategies. A modifier lifecycle consists of:
- createModifier()
- installModifier()
- updateModifier()
- destroyModifier()
Within the means of explaining the lifecycle strategies, Raja particulars every step with code snippets that assist the reader perceive what every of them means.
Learn extra concerning the component modifier supervisor and its internals on dev.to at this time!
The magic behind Ember modifiers โจ
Raja SK’s third weblog submit on Ember modifiers is titled the magic behind the ember modifiers, the place he talks concerning the inside workings of an Ember modifier – a function that’s supplied by Ember Octane.
Within the means of explaining how a modifier works, he showcases its use by writing an autofocus modifier utilizing the useful modifier method.
For extra particulars on the weblog, test it out on dev.to.
Demystifying ember-render-modifiers ๐
Lastly, Raja SK’s fourth weblog submit talks about demystifying ember-render-modifiers.
He talks about ember-render-modifiers, which offer component modifiers that can be utilized to hook into particular parts of the rendering lifecycle of a element.
There are a number of addons based mostly on ember-modifier, however ember-render-modifiers makes it straightforward to know its implementation. In case you are seeking to write your individual customized modifiers, then ember-render-modifiers is an effective place to begin with. Learn extra on the weblog submit on dev.to at this time!
P.S. Robert Jackson (@rwjblue) just lately revealed a serious model bump of ember-modifier to v2.x, take a look at the Changelog!
Koushik Radhakrishnan (@Koushikrad) wrote a weblog submit on detecting when Ember parts are coming into or leaving the viewport.
Think about a dashboard with 10 widget parts, every of which makes an API request. When a consumer lands on the dashboard web page, do we want all of the widgets to fetch their knowledge on the similar time, even when the consumer’s viewport exhibits solely 5 widgets at a time?
An answer is to make use of the ember-in-viewport addon, which detects if an Ember element has entered the browser’s viewport. The addon tries a couple of totally different approaches (IntersectionObserver
API, then requestAnimationFrame
, then the Ember run loop and occasion listeners) to detect if a DOM component is within the consumer’s browser.
By hooking up with the addonโs supplied inViewport
service, we’re in a position to request knowledge as soon as the element is throughout the viewport.
const { onEnter } = this.inViewport.watchElement(this.component, { viewportTolerance });
onEnter(this._renderInView.bind(this));
The parts that aren’t in view won’t make a request for API knowledge, not like the routeโs mannequin hook utilizing a Promise.all
.
Learn extra about detecting parts from the weblog submit!
There’s an fascinating perspective about how your crew would possibly deal with utilization of Ember’s built-in parts in a GlimmerComponent
world introduced in Mehul Kar’s (@mehulkar) latest weblog submit.
The submit signifies that with the intention to keep away from introducing breaking adjustments you could wish to take into account not extending Ember.Element
since GlimmerComponent
doesn’t have the identical strategies to assist such extension.
This weblog submit continues the dialog Mehul began in an RFC on the topic earlier this yr that proposes making @ember/element
an elective function. Conversations like these are important to the well being of Ember’s ecosystem! So if you happen to’re excited about collaborating on this dialog and have opinions, head on over to the RFC and supply some suggestions.
Hope you did not miss an thrilling announcement earlier in July. Josemar Luedke (@josemarluedke) launched Docfy, a cross-framework device that will help you construct documentation websites from Markdown recordsdata.
The perfect half? Docfy offers official assist for Ember.js! You’ll be able to fashion the Docfy parts and leverage present comment plugins too.
Take a look at Getting Began to study extra about including Docfy to your Ember apps.
This week we might wish to thank @abhilashlr, @Alonski, @arthirm, @bekzod, @cah-briangantzler, @chancancode, @chrisrng, @CodingItWrong, @dfreeman, @emonroy, @ijlee2, @IzzatN, @jaredgalanis, @jenweber, @kategengler, @kiwiupover, @locks, @loganrosen, @MelSumner, @NullVoxPopuli, @ppegusii, @pzuraq, @RichardOtvos, @rwjblue, @scalvert, @snewcomer, @SYU15 for his or her contributions to Ember and associated repositories! ๐
Questioning about one thing associated to Ember, Ember Knowledge, Glimmer, or addons within the Ember ecosystem, however do not know the place to ask? Readersโ Questions are only for you!
Submit your individual brief and candy query below bit.ly/ask-ember-core. And donโt fear, there are not any foolish questions, we recognize all of them – promise! ๐ค
Need to write for the Ember Occasions? Have a suggestion for subsequent week’s concern? Be part of us at #support-ember-times on the Ember Group Discord or ping us @embertimes on Twitter.
Carry on prime of what is been occurring in Emberland this week by subscribing to our e-mail e-newsletter! It’s also possible to discover our posts on the Ember weblog.
That is one other wrap! โจ
Be sort,
Chris Ng, Abhilash LR, Isaac Lee, Jared Galanis, Amy Lam and the Studying Staff