Ember stop deprecating!

Deprecation is a good thing. It means they have found a better way to do things - and they give you plenty of warning and time to amend your code in the version cycle.

I’ve also been frustrated with the out of date tutorials and documentation, but the only thing you can do is try to be part of the solution. No one is getting paid to do any of that stuff. ( Plus trying to learn Ember for 1 week - is really no time at all. ) I think you are losing your patience in general and not just with Ember.

I’m 6 months or more in - and no expert, but I refactored my helpers like this:

for helpers/i-con.js

import Ember from "ember";

export function iCon(value) {
  return Ember.String.htmlSafe("<svg class='icon-x'><use xlink:href='#icon-" + value + "'></use></svg>");
}

export default Ember.Helper.helper(iCon);

In an Ember CLI context. Maybe that will help you. I just had to plug and play until it worked. I think they actually updated that in the docs (I’ve notice some updates in there recently) Helper - 4.6 - Ember API Documentation

You could also be seeing those errors because some add-ons - or components or other things are using their helpers and haven’t updated yet.

Before a week ago - we had to update these helpers a few times between handle-bars and html-bars and for other reasons - so - Either stick with a version for a while, or try and see it as some growing pains / they are painful - but not as painful as when Angular ripped out half their code… : )

2 Likes