Learn how to learn to share recipe and favorite data between two routes.
- [Instructor] Hi.…Nice time to talk about how to…Share State Between Routes.…And the reason we want to do that,…is because we want to share the data…about recipes and favorites…between the both routes that we have defined…in our project.…So this is how the favorite feature should work right now.…What we have now,…is that we can click on a recipe,…and add it as a favorite.…This is all happening in our route path.…But now we want to be able to go to our favorite path,…and being able to unfavorite recipes from there.…Just notice that the favorites routes…is only going to render the recipes…that I have in favorites.…
So once we unfavorite,…that recipe should be removed from the favorite lists.…So let's go to our code editor,…and start developing this new feature.…If you remember, the home component is the one…that is keeping track of the favorites,…and the recipes that I have loaded.…But since I want to share this data with the favorite path,…the only way I'm achieving this…is to manage this data one level up…in the component hierarchy.…
- Structuring React projects
- Creating and mounting the root component
- Composing components for more complex UI
- Using state to making components dynamic
Skill Level Intermediate
React: Managing Complex Interactionswith Emmanuel Henri1h 45m Intermediate
1. How to Structure React Projects
2. Diving into the First Components
3. Styling Made Easy
5. Painless Components Testing
Configure Jest5m 44s
- 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.