-
-
Notifications
You must be signed in to change notification settings - Fork 71
Add Classic Classes Deprecation Guide #1409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ember-deprecations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There is no direct replacement for `reopen`. You should refactor your code to avoid this pattern. If you need to add functionality, consider creating a subclass: | ||
|
||
```javascript | ||
import MyComponent from './my-component'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any chance we can use a word other than component?
I don't want folks to get the idea that we condone component extension at all (even for native classes)
Should this also deprecate the |
@ef4 we should deprecate it, but I'm not sure we need to call it out in these guides. |
since: 6.5.0 | ||
--- | ||
|
||
With the introduction of native class syntax in JavaScript, Ember is deprecating its classic class syntax, which includes `extend`, `reopen`, and `reopenClass`. This guide will help you migrate your code to the modern syntax. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably mention the codemod for native classes, as well as a migration path: emberjs/rfcs#1117 (comment)
RFC: emberjs/rfcs#1117