Ember Octane Upgrade - Both Classic vs Glimmer component support

I am upgrading Ember 2.15 to Ember Octane 3.16 and need following clarifications -

  1. Is it mandatory to rewrite classic components (Object based, not native class based) to glimmer components ?
  2. Also is there a RFC/Deprecation of Classic components support down the line ?
  3. Is it fine to have mix and match of classic components (retaining as is for existing code) and creating glimmer components only for new creations ?
  1. no, part of the strategy for rolling out Octane was full backwards compatibility so there are no requirements to migrate to glimmer components in order to upgrade. I think the idea for most people would be to go back and update components one at a time slowly and write new components with Glimmer components and native classes. That’s going to be how we’re doing things at my company. You can use classic components with either Ember or Native classes.
  2. I’m not aware of one currently, though it sounds like that’s the idea long-term. So I’d say you should probably be transitioning all your components to glimmer components eventually, but there’s no real urgency.
  3. Yes, that should be totally fine. I think most long-lived apps will have classic components with ember classes with “classic reactivity” in either pods or traditional filesystem arrangement (/components + /templates/components) and will be slowly migrated to Native-class based Glimmer components with tracked properties and template co-location. My company’s app has a TON of components so it’s going to take a long time for us but we’re starting with highest touch UI components, etc and then migrating as we touch old stuff.

There are a lot of nice codemods for transitioning this stuff and I would highly recommend using them. And I assume you’ve seen the octane conversion cheatsheet but if not that’s a good resource as well.

2 Likes
  1. There is a decorator called @classic you can put them on all the js files that are still ember objects. Then when you upgrade them, you remove it.
  2. Not that I know of
  3. It’s fine to mix and match.