Join Eve Porcello for an in-depth discussion in this video Adding child elements, part of Learning React.js.
- [Instructor] In the previous video,…we created the board component.…Even though we have a board and a note component though,…they aren't quite working together yet,…so let's make the board the parent of the note component.…The first thing I want to do here is…I want to adjust our count,…and make it a more reasonable number…so we don't see that error,…and then I'm going to add a method…that you are familiar with already,…called get initial state.…We are going to create an initial state for notes.…
Let's return an object, where the key is notes,…and we are going to set this equal to an array.…Now, the notes array is going to store four different notes,…and the contents of those notes…will be displayed within the note.…Let's go ahead and say call Bob,…email Sarah,…eat lunch,…and finish proposal.…
Great, so our initial state of the application…holds four notes in state.…The next thing that we will do is,…instead of using this dot props dot count,…We're going to use a simple map function…that's going to map over the notes array,…
- What is React.js?
- Introducing JSX
- Creating a React component
- Handling events
- Using state
- Working with PropTypes
- Adding child elements
- Mounting and updating components
- Creating a React.js app
Skill Level Beginner
Building a Web Interface with React.jswith Ray Villalobos1h 21m Intermediate
1. What Is React.js?
2. Getting Started
3. React Components
4. Props and State
5. Enhancing Components
6. Creating an App
Using create-react-app4m 38s
Next steps1m 4s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.