Skip to content

Instantly share code, notes, and snippets.

View sormy's full-sized avatar

Artem Butusov sormy

View GitHub Profile
@heygrady
heygrady / rules-for-components.md
Last active April 7, 2020 03:08
Rules for crafting good components

Rules for crafting good components

Here are some good rules for a high-quality react-redux app.

We're in the process of reworking our app to make it more maintainable. In a previous meeting we discussed the general rules of thumb for writing maintainable code. Here we're going to be covering rules of thumb for writing good components.

  1. Components should do one thing.
    • We use BEM as a guide.
    • A nested "block" should be a standalone component.
  2. Prefer stateless functional components.