React and React Native
上QQ阅读APP看书,第一时间看更新

Summary

This chapter was about avoiding monolithic component design. However, monoliths are often a necessary starting point in the design of any React component.

We began by talking about HTML and how the different elements have varying degrees of utility. Next, we discussed the issues with monolithic React components and walked through the implementation of a monolithic component.

Then, you spent several sections learning how to refactor the monolithic component into a more sustainable design. From this exercise, you learned that container components should only have to think in terms of handling state, while smaller components have more utility because their property values can be passed from anywhere.

In the next chapter, you'll learn about the React component lifecycle. This is an especially relevant topic for implementing container components.