A user interface in a React application is made up of a collection of components. In this video, you can create a library component that displays multiple different book components that have different properties.
- [Instructor] So far, we've created a component…and we've created some custom methods…to live on that component.…Now, really the power of React…comes from composing multiple different components.…So we're going to adjust this file…so that we can account for that.…So let's go ahead and get rid of this component.…I'm also going to get rid of the SkiDayCounter…that's being rendered here.…And we're going to replace this with something entirely new.…And the new component we're going to replace it…with is called Library.…
So library is going to return something fairly simple.…We'll say return a div where it just reads…welcome to the library.…I promise we'll do better than that in a second.…And then we're going to render this component here on line 13.…Alright, so it's rendering appropriately.…Now as far as composing components go,…that when we talk about composing components,…it might be tempting to do something like this,…to render multiple different…library components here to our DOM.…
As soon as I try to render this though,…
- Refactoring elements with JSX
- Creating components
- Adding component properties and methods
- Displaying child components
- Working with props and state
- Conditional rendering
Skill Level Intermediate
1. What Is React?
2. Introduction to React Elements
3. React Components
4. Props and State
5. Additional Library Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.