Join Eve Porcello for an in-depth discussion in this video Using state, part of Learning React.js (2016).
- [Instructor] One of the most important…react concepts is state.…When a component's state data changes,…the render function will be called again…to re-render the change in state.…Lets take a look at a small sample…of state and react components…and then in the next video…we're going to add it to the note.…So, here we have just an index.html file…with all of our scaffolding for the projects.…So react, react-dom, babel-core,…react-container, and our script tag.…And inside of the script tag on line 13…we're going to create a component called Checkbox…and Checkbox is going to simply introduce state.…
So, a checkbox, if you think about it,…is a great demonstration of state.…It has two states, checked and unchecked.…So here let's go ahead and render…and we're going to return a simple div.…So, we'll add a div here.…We'll go to /div.…And then inside of this div, we're going to create an input,…a type of checkbox and then let's also create a paragraph,…which we won't use right away, but we will, I promise.…
And then let's move this back up,…
- 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.