Favor composition over inheritance

Build functionality by combining smaller, specialized components instead of creating deep inheritance hierarchies. Composition offers greater flexibility and modularity which will make you move faster as things change over time.

Examples

  • You don’t often use classes anyway, but when you do, you think twice before using `extends`.