Join Eve Porcello for an in-depth discussion in this video Keys, part of Learn React.js: The Basics.
- [Instructor] When rendering our note components,…we pass a key property to our component…when it is part of an array of children.…Our board is the parent,…and it's note children all contain this key property.…I wanted to take just a second to talk about…the importance of the key property.…This may help you if you ever see…a particular warning message in your console.…To demonstrate this, I'm going to remove key,…I'm going to give it a save,…and I'm going to reload our application here in our board.…Now, if I add a note, we immediately see a warning…that says each child in an array,…or iterator should have a unique key property.…
Now, the reason that this is happening is…because when something changes in React,…a re-render of what has changed will occur.…If our children are dynamic,…let's say they get shuffled around with random functions,…or new components are added to the beginning of an array,…the re-render might get messed up.…To ensure that the state and the identity of our components…is maintained through multiple renders,…
- 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?
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.