Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Commit

Permalink
Updates write-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Mi6u3l authored Jun 21, 2018
1 parent 26d6b12 commit bc6aced
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/blog/2018-06-22-the-ember-times-issue-52.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Read either on the [Ember blog](https://www.emberjs.com/blog/2018/06/22/the-embe

## [Native Class Constructor Update 🛠](https://github.com/emberjs/rfcs/pull/337)

There is currently an open RFC proposing to change the behavior of EmberObject's constructor.
There is currently an open RFC proposing to change the behavior of `EmberObject's` constructor.

Native class syntax with EmberObject has almost reached full feature parity, meaning soon Ember will be able to ship native classes.
However, early adopters of native classes have experienced some serious issues due to the current behaviour of the class constructor. The issue is caused by the fact that properties passed to `EmberObject.create` are assigned to the instance in the root class `constructor`. Due to the way that native class fields work, this means that they are assigned _before_ any subclasses' fields are assigned, causing subclass fields to overwrite any value passed to `create`.
Expand Down Expand Up @@ -43,6 +43,7 @@ This would assign the properties _after_ all of the class fields for any subclas

One thing worth mentioning is that EmberObject will likely be deprecated in the near future and that ideally for non-Ember classes (things that aren't Components, Services, etc.) users should drop EmberObject altogether and use native classes only.

:point_right: As always, all comments to this RFC are more than welcome, so let's help out in order to finalize it! :sparkles:


---
Expand Down

0 comments on commit bc6aced

Please sign in to comment.