Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

State Management in React - Context API useContext - React Tutorials for Beginners

Dave Gray via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Dive into state management in React with this comprehensive tutorial on the Context API and useContext hook. Learn how to create and implement context, refactor components using useContext, and optimize your React applications by distinguishing between component state and shared state. Explore practical examples of refactoring various components, including Header, Nav, Home, NewPost, EditPost, and PostPage. Gain insights into when to use context and how to balance component-level and shared state for more efficient React development.

Syllabus

Intro
Welcome
Quick Overview
Creating Context
Adding the DataProvider
Moving State and Logic to Context
Refactoring Header with useContext
Refactoring Nav with useContext
Refactoring Home with useContext
Refactoring NewPost with useContext
Refactoring EditPost with useContext
Refactoring PostPage with useContext
App component clean up
Does it all need to be in context?
Component state vs shared state with context
Refactoring component states while keeping shared state in context

Taught by

Dave Gray

Reviews

Start your review of State Management in React - Context API useContext - React Tutorials for Beginners

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.