Web framework: Ember 4.5 turns functions into helpers

Web framework: Ember 4.5 turns functions into helpers

The Ember JavaScript framework has reached version 4.5. It thus remains true to the planned rhythm, which provides for a new minor version every six weeks. The core framework Ember.js contains two new features and the Ember CLI brings bug fixes and deprecations. The data persistence library Ember Data, on the other hand, remains on the previous version 4.4 due to low availability of the team.

In Ember.js 4.5, ordinary functions can be used as helpers in Ember component templates. This is intended to make the relationship between the templates and their JavaScript class more intuitive. As an example, the Ember team shows how to create the method double and its subsequent use in a template:

// my-component.js

import Component from '@glimmer/component';

export default class MyComponent extends Component {
  double = num => num * 2;
// my-component.hbs

{{this.double 2}}

<SomeComponent @foo={{this.double 2}} />

So far, this procedure could be defined locally, but using the helper()-Function. RFC 756 (Request for Comments) provides further information on the new feature, and a dedicated blog entry is to follow within the next few weeks.

The Test Helper is also new on board renderSettled. It allows test helpers to interact with the rendering phase of an application. renderSettled returns a promise that is fulfilled once rendering is complete, and can be used in any rendering or application test. Further information is also available for this new function: RFC 785 goes into the background.

With the release of Ember 4.5, the minor version Ember 4.4, which was released at the end of May, changes to the status of a release with Long-Term Support (LTS). It thus replaces Ember 3.28, which was released in September 2021, as the previous LTS release. An LTS release usually occurs every four minor releases and receives updates over nine release cycles (54 weeks). Bug fixes span six release cycles (36 weeks).

Linux-Administration: firewalld 1.2 mit deutlich mehr unterstützten Diensten Previous post CentOS successor: Google Cloud relies on Rocky Linux
IT Skills Shortage: Which Programming Languages ​​Are Most Demanded? Next post IT Skills Shortage: Which Programming Languages ​​Are Most Demanded?