question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EC could play nicer in ES6 classes

See original GitHub issue
export default MyComponent extends Component {
  myTask = task(function * {
    await timeout(1000);
  }
}

Runtime deprecation:

DEPRECATION: [DEPRECATED] computed property '_debounceAddHistoryStep' was not set
on object '<dummy@component:property-editor::ember346>'
via 'defineProperty' [deprecation id: ember-meta.descriptor-on-object]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
buschtoenscommented, Oct 11, 2018

FWIW defineProperty is a valid solution that works safely, however it (and the assignment syntax like myTask = task(function*() { ... })) have a subtle problem.

They are run each time the object is instantiated, which degrades performance and increases the memory footprint of your application. Just keep that in mind. 😄

1reaction
buschtoenscommented, Aug 31, 2018

@machty Sure! 😄 I was talking abou the repo description in the top, that is a GitHub UI setting:

image

I could swear that it contained EXPERIMENTAL when I last looked 😛 Thanks for removing! Will make a release soon. We’re paddling towards a deadline right now, so could be a few days. I’ve set me a reminder though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Opinions : Do you use es6 classes : r/javascript - Reddit
There is nearly universal consensus on this: ES6 classes are easier to read/maintain/work with/etc. and are just simply superior to pre-ES6 ...
Read more >
As a JS Developer, This Is What Keeps Me Up at Night - Toptal
Did ES6 classes help or just muddy the waters? Find out what veteran JavaScript developer Justen Robertson thinks about OOP in JS.
Read more >
JavaScript ES6: Classes. Objects in programming languages…
Objects in programming languages provide us with an easy way to model data. Let's say we have an object called user.
Read more >
Are ES6 classes just syntactic sugar for the prototypal pattern ...
No, ES6 classes are not just syntactic sugar for the prototypal pattern. While the contrary can be read in many places and while...
Read more >
Inheritance (IS-A) vs. Composition (HAS-A) Relationship
IS-A relationship based on Inheritance, which can be of two types Class Inheritance or Interface Inheritance. · Has-a relationship is composition ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found