Join Eve Porcello for an in-depth discussion in this video Updating and removing notes, part of Learning React.js.
- [Instructor] In this video we're going to create functions…that are going to handle updating and removing notes.…The first thing I want to do here…is I want to change our notes array…and I want to change these notes to be objects.…So the object is going to have a key of id…and then it's going to have a key of note…and that's just going to be set equal…to whatever the string is.…So let's go ahead and create these for all four of our notes…and we're going to go ahead and update the ids…zero, one, two, three.…
We'll say Email Sarah, Eat Lunch,…and Finish proposal.…Awesome.…So this is going to help us process these notes…a little bit easier when we start to update and remove them.…Speaking of that, let's go ahead and add our update method.…Update is going to handle the editing of notes…so the update method is going to take…in new text and the id.…And then we're going to create a variable called notes.…
This is going to be set to our notes in state…and we're going to map over those…and depending on whether or not this note should be updated…
- 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.