In this video, learn how to solve the challenge of making the color selector component interactive, and learn how to make the two selectors reflect availability based on the inventory data.
(upbeat music) … - [Instructor] Here's my solution … to the color selector challenge. … The goal is to activate the color selector … so that it causes changes … in the available list of sizes and optionally, … to update the selected size piece of state … based on that availability check. … So if I change the color from red to green, … I can see that the shoe changes color. … And my list of sizes is shrinking. … Now if I start changing things over here, … I'm starting to paint myself into a corner a little bit … where some of the colors are disappearing, … and some of the sizes are disappearing as well. … We could add a react powered reset button to fix all this. … We don't have it right now, so I'll just reload. … I also said to watch out for weird behavior, … and of course, paint ourselves into a corner like that … was one piece of weird behavior, but here's another one. … If I keep the color red and go to size 12, say, … the picture shows a brown shoe … but the currently selected color is green. …
- 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
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.