React application design
Now that we understand components, it's time to discuss how to design a React application with the power of components. A React application is composed of a number of components that talk to each other. There should be a main container component, which acts as an entry point to other components. The React community recommends against writing components that inherit from other components. Instead, the community recommends composition to be used. So, whenever we talk about parent and child components, we don't mean that child components inherit the parent component's classes, we just mean that the parent component contains one or more of the child components.
Composition means that all of your component classes should ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access