📝Push smart components up as much as possible

When working with Smart/dumb components (Container/View), it’s best to use as much dumb components as possible. They are usually stateless, predictable, and easy to work with.

If you can make a component dumb—do it. This naturally results in pushing state upward and bubbling events through view hierarchy. When this advice is followed through to the conclusion, it results in a single container per page and the whole page has a view component.

Sometimes that is not possible (e.g., parts of page fetching data independently), in which case Injecting smart components / containers can be helpful.

Backlinks