The new Context API was released for React in version 16.3. This provides a new way to pass data to components without having to explicitly reference it in each component in the tree.
- [Instructor] In React applications we create…nested component trees to compose our user interfaces.…In early React apps sometimes you'd see state everywhere.…This made it really easy to get some data quickly,…but having state all over your app…made it difficult to keep those values in sync.…The common ideology then became,…hey, instead of putting state everywhere,…let's only put it at the root.…Then we can pass down state data to components via props.…So this starts out fairly straightforward.…
We can create a parent component…that renders a child component.…Let's go ahead and do this.…So here on line 11 I'm going to…create a component called resort.…This is gonna have some state,…which is just the name of the resort.…And then we're gonna render something.…So let's render…a div that just displays that name.…
All right and then we're going to go ahead…and render this resort.…Perfect.…Next up let's create that child component.…So this is gonna be called Lift.…And this is just a stateless component…that will render a div.…
- What's new in React 16
- Rendering arrays
- Controlled, uncontrolled, and compound components
- Using keyed fragments
- Working with new lifecycle methods
- React patterns
- Using the context API
- Checking for accessibility issues in your React code
Skill Level Advanced
1. What’s New in React
2. Advanced Components
3. Enhanced Components
4. React Patterns
5. React Accessibility
- 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.