Ember Add Listener Helper

screenshot of Ember Add Listener Helper

Easily and safely use @ember/object/events via a template helper

Overview:

Ember-add-listener-helper is a tool that allows users to easily and safely use @ember/object/events via a template helper. It helps to address the issue of leaking event listeners and provides a simpler way to handle event registration and unregistration when using glimmer components and arguments. While Ember's eventing system may be deprecated in the future, this helper provides a convenient solution for the current version.

Features:

  • Easy and safe usage of @ember/object/events via a template helper.
  • Compatibility with Ember.js v4.8 or above, Ember CLI v4.8 or above, and Node.js v16 or above.
  • Handles registering, un/re-registering event listeners when arguments change.
  • Unregisters events on un-render.
  • Works with objects triggering events using sendEvent or .trigger().

Summary:

Ember-add-listener-helper is a tool that simplifies the usage of @ember/object/events via a template helper. It provides a convenient way to handle event registration and unregistration, especially when working with glimmer components and arguments. The compatibility with the latest versions of Ember.js, Ember CLI, and Node.js ensures that the helper can be integrated seamlessly into your project. Despite the possibility of Ember's eventing system being deprecated in the future, this helper offers a solution for current use cases.