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. …
Author
Released
6/5/2019- 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
Duration
Views
Related Courses
-
Essentials of CSS for React Developers
with Eric Greene53m 31s Beginner -
React.js Essential Training (2018)
with Eve Porcello1h 25m Intermediate
-
Introduction
-
Using the exercise files1m 2s
-
1. Introducing React
-
2. First Project: Customizer
-
Attaching a data source3m 20s
-
Implement props4m 28s
-
Solution3m 4s
-
3. Second Project: Directory Browser
-
Scaffold initial components5m 58s
-
Functional components6m 37s
-
Build the filters form5m 41s
-
Wire up the filters form10m 57s
-
4. Third Project: Status Updater
-
Using conditional rendering4m 36s
-
Let form post to the API3m 25s
-
Conclusion
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Solution