Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.37 KB

no-classic-components.md

File metadata and controls

42 lines (28 loc) · 1.37 KB

ember/no-classic-components

💼 This rule is enabled in the ✅ recommended config.

This rule aims to enforce Glimmer components instead of classic ones. We should migrate to Glimmer components because they have few advantages:

  • Simpler API
  • No wrapper element
  • Namespaced Arguments
  • Less lifecycle hooks
  • Stateless Template-Only Components
  • Unidirectional Dataflow

With that simpler API we could improve the DX and also lower the entry level for Ember.

Rule Details

If you want to migrate to Glimmer components this rule can help find the classic components that you need to migrate.

Examples

Examples of incorrect code for this rule:

import Component from '@ember/component';

Examples of correct code for this rule:

import Component from '@glimmer/component';

References