React tracks changing data in the form of state. In this video, learn how to create state data that will be passed to child components as props, and learn how a component must be a class, versus a function, in order to use state.
- [Instructor] In this video we're going … to implement State for the first time … with the help of React's useState hook. … Hooks are a relatively recent and nifty addition to React. … Their function is to let your function components … access features that used to be accessible … only by class components. … State is one of those features, and as we know, … state lets the component track the condition of data … and update itself when those data change. … So all that said, let's give this a whirl. … Looking at how things are right now, … there are a few pieces of data … that we're going to need to track. … Let's go with the current color of the shoe, … the currently selected size, … and all of the sizes that are available. … We're using a hard coded data source right now … for all of these sizes, but theoretically they might change … if we were accessing an API, so we'll treat them … as something that might be changeable at some point. … So current color, current size, all sizes. … Over here in my code, we're going to scroll down …
- Installing React on an existing site
- Thinking about a design in terms of components
- Creating fully-featured function components using Hooks
- Storing and retrieving data from an external RESTful API
- Employing third-party components for CSS animation
- Using conditional rendering
Skill Level Intermediate
Essentials of CSS for React Developerswith Eric Greene53m 31s Beginner
React.js Essential Training (2018)with Eve Porcello1h 25m Intermediate
Using the exercise files1m 2s
1. Introducing React
2. First Project: Customizer
3. Second Project: Directory Browser
4. Third Project: Status Updater
- 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.