jeudi 27 février 2020

Replace deprecated `this.$()` in Ember 3

this.$() has been deprecated in Ember.js and will be removed in Ember 4. It should be replaced with native Javascript. Still, the migration could be hard to do in one shot.

Is this the right way to replace previous this.$() while continuing using JQuery?

// BEFORE
this.$().on('transitionend', () => this.doSomething());

// AFTER
import $ from 'jquery';

$(this.element).on('transitionend', () => this.doSomething());

Or is there another approach?




Aucun commentaire:

Enregistrer un commentaire