From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Build the UI and create reusable components

Build the UI and create reusable components

- [Instructor] Let's take a moment to understand one key concept of React. React has a powerful model of composition which is to reuse components, create flexible, highly maintainable and customizable user interface. The concept of composition is to divide the UI into small independent units. The problem is that when you have big components, it can be difficult to read through and to maintain. So the solution is to divide the user interface into small units of reusable and flexible components in order to keep the code-base organized and improve performance. Let's see what composition may look like in graphics before jumping into the code. So it's just like pieces of Legos put together. The UI is built with multiple units and some reusable units. For example, for every image you want to display in the image gallery, we're going to use the same reusable component card. And for the nav bar that we have added into our…

Contents