<aside> 🌎 This is a publicly shared document (link)

</aside>

Composition

Composition is king. The ability to de-compose your problem into small pieces is fundamental.

Here is what defines a good composition:

Naming

Naming is hard but very important. Spend time figuring out good naming. Name things in context and in a way that makes sense for the business. Get feedback from others.

Immutable Data

Treat data as immutable rather than mutable when possible. E.g. never, ever mutate function arguments.

Composition over inheritance

https://medium.com/humans-create-software/composition-over-inheritance-cb6f88070205

Functions, objects, classes

Prefer a function to an object. Prefer object to a class. It’s tempting to use classes in JavaScript when you are coming from Java/C# background, but it’s rarely a good idea. When writing React, always use functional components.

Additional reading https://medium.com/@dan_abramov/how-to-use-classes-and-sleep-at-night-9af8de78ccb4