React 19 Context API has changed! 🚀 In React 19, you no longer need to write Context.Provider for new Context providers. The Context itself can now act as the Provider.
🚀 REACT LIVE ONLINE CLASSES I am starting React Live Online Classes from:
-------------------------------------------------- 🔥 Before React 19: UserContext.Provider value={user}
🔥 React 19: UserContext value={user}
But what actually changed? Is React 19 Context API faster? Does removing .Provider improve performance? And what happens to useContext?
In this complete React 19 Context API tutorial, we first understand the Prop Drilling problem visually and with practical React code. Then we learn why Context API exists, how createContext works, how Context.Provider worked in React 18, and finally what changed with Context as a Provider in React 19.
The important point is that removing .Provider is mainly a cleaner and simpler syntax change.
✅ Same Context behavior ✅ Same purpose ✅ No special performance boost just from removing .Provider ✅ Cleaner and easier-to-read syntax
You still provide a value to descendant components, and components reading that Context can access the current value.
━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━
📚 IN THIS VIDEO YOU WILL LEARN:
✅ What is Prop Drilling in React? ✅ Why do we need Context API? ✅ What is Context API in React JS? ✅ How createContext works ✅ Context Provider in React 18 ✅ How to use Context API in React ✅ React 18 Context API practical coding ✅ React 19 Context API changes ✅ Context as Provider in React 19 ✅ Why .Provider is no longer required ✅ React 18 vs React 19 Context API ✅ React use() API with Context ✅ use() vs useContext Hook ✅ Conditional Context reading with use() ✅ Practical React Context API example in VS Code
━━━━━━━━━━━━━━━━━━━━
⏱️ VIDEO TIMELINE
00:00 Prop Drilling in React Explained Visually — Why Context API Exists 00:41 What is Context API in React? — Share Data Without Prop Drilling 01:20 How Prop Drilling Works — Passing Props Through Multiple Components 04:10 React Live Online Classes Announcement — React 19 Live Batch 05:20 Prop Drilling Practical Example in React — Live Coding in VS Code 08:00 React 18 Context API Explained — createContext, Provider & useContext 12:50 React 18 Context API Live Coding — Context.Provider + useContext Example 16:20 React 19 Context API Animation — Context Itself Becomes the Provider 19:20 React 19 Context API Live Coding — Is .Provider Still Needed? 20:05 React 19 use() API vs useContext Hook — What Changed? 21:00 Like, Share & Subscribe ❤️
If you are interested in learning React LIVE with me, fill out the registration form given in the description and pinned comment.
Please enter your correct:
✅ Name ✅ Email ID ✅ Phone Number
I will contact you directly on WhatsApp.
━━━━━━━━━━━━━━━━━━━━
This React 19 tutorial is useful for anyone searching for:
React Context API, Context API in React JS, React Context API in Hindi, Prop Drilling in React, useContext Hook, React 19 Context API, Context Provider React, React 19 use API, use vs useContext, React 19 new features.
00:00 Prop Drilling in React Explained Visually — Why Context API Exists 00:41 What is Context API in React? — Share Data Without Prop Drilling 01:20 How Prop Drilling Works — Passing Props Through Multiple Components 04:10 React Live Online Classes Announcement — React 19 Live Batch 05:20 Prop Drilling Practical Example in React — Live Coding in VS Code 08:00 React 18 Context API Explained — createContext, Provider & useContext 12:50 React 18 Context API Live Coding — Context.Provider + useContext Example 16:20 React 19 Context API Animation — Context Itself Becomes the Provider 19:20 React 19 Context API Live Coding — Goodbye .Provider? 20:05 React 19 use() API vs useContext Hook — What Changed? 21:00 Like, Share & Subscribe ❤️
AI Generated·May contain errors
Video Summary
AI Generated
This video explains \"prop drilling\" in React and how the Context API resolves it. It specifically compares the implementation between React 18 and React 19, highlighting how the newer version reduces boilerplate code by simplifying the provider syntax and introducing the flexible `use` API for accessing shared data.
He will look at the cow with concentration.
First of all, we need to take a look
What is the prop drilling issue?
What is this prop drilling?
Alright
First of all
Let's assume
In our React application
We have one component.
great-grandparent
Alright
Inside this component
We are calling a component.
grandparent
Now inside the grandparent component
And inside them
I'm calling another component
child component
Alright
But wait
Meaning
We're reading about React version 19.
But why am I telling you this?
I'm telling you this because
Because today we have to see
that
inside the context API
But
I thought that
Brother
Derekli
If I were there
I am lying down.
So it could be
From you
Sometimes many
This is not just an idea anymore.
that
What is Context API?
Then
context API of
We need
Why read?
And
The most
Classic indeed
Who
prop drilling
So
I have
Thought
Today
I will give you
Whole
from start
until the end
Everything
I'll tell you
with the help of
animation
and
With you always
live
coding
Even so
So this one
Meaning
that
Today
Just
This
One
In the video
Your
React's
one of the
most
important
topics
drilling prop
context
API
Yes
Everything
Here
Mine
Grandparent
Our
Data
Yes
Our
Who
Great
Grandparent
Yes
With them
A data
Yes
In this
Yap's
Name
Their
Wife
ka
Name
Dhiyo jāye
So
Basekeli
Who
So, Great Grant Parent, then Grant Parent, then Parent, then Courage
So, there is great courage where there is courage.
Do you know the names of your paternal grandfather and grandmother?
So, now here's the Uncle, Uncle's crap
So, what's going on here?
great-great-grandparent
who as a props
our grandparents
We'll pass the data, unko.
You can see it here
And here it is
Will the data pass or not?
After that, it will happen.
Who are our grandparents?
Same with the help of props
You can see the mangoes that have been kept here.
If you look
With the help of props
We passed the data.
Thake
Grandparent's house is nearby.
Our parents are here
to parent ne
Who are the people involved in the proposal?
Got it.
basically it's my props
These data here
Got him.
Same way, now our parents who are these
Look, the grandparent went from the grandparent to the parent.
Through the parent
Yeah, isn't it, Bijkar Kile?
The family-related data that was there
Got him.
You can see, parents passed children
So what are you all saying? Hoe you will say, what's the problem here?
Stay, is this a thief? The thing is,
Bobby's greater parent is his first parent, but he doesn't say brother; he says he doesn't need this data.
This data is ours; we have passed it to the parent.
So that we may pass on to them the children they have.
Same way, mostly parent
Basically, we almost always remember Dadu and Dadi's names too.
So, upon checking, even the parent was unaware of this data.
But poor thing, he needed that name for his own children.
So we also passed this data into the parent
So, we have passed this data to the child in this manner.
So,ağlık yok, tell me you
An important update for you before moving forward
From September 20th, I will be conducting live, React, and online classes.
If you want, learn to sing every day from me personally
But right now I'm taking a JavaScript class.
But on the very same 20th, I mean, September 20, 2026 onwards
I will teach React every night from 9 to 10:30, until 11 o'clock.
Alright, wherever you can ask dot every day, you'll have a lot of fun.
We'll see a lot of things, okay, and even within that, all of this will be animation.
Just imagine how fun it would be, no? If you want to join React online classes
Where I'll teach myself every day by coming to the library, then check the link below
There will be a form; just fill in your name, email, ID, and mobile number.
I will share you further details in the WhatsApp message.
Don't worry, the price will be very low, meaning it'll be fun.
Before moving forward, I just have one small request from you—please like this video, share it with your friends, and if you haven't subscribed to my channel yet, please do so now. Thank you for the next target.
Please like, guys, it really motivates me, feels so good, like this
Creating animations with C4D
Alright, so the same problem I've placed here for you all, take a look
This is my component, inside which I've created a simple object and stored it, okay? This data here—whose need is it? It's needed by my child component, the child component needs it, but I can't directly
Liya, no longer, then props, props.family could have done it for anyone, so the meaning is that ours
The grandparent, having obtained this data, now calls the parent component.
I'm doing it, and now obviously I also need to pass data to the parent component, so that
You'll also see it in the parent component there; I've retrieved this, this is ours
The data that was there, I've passed it here as a prop, the value that exists, then we have
parent component, I also fetched it there, and then finally I passed it to the child component
In this way, my child component here has retrieved the data—look, family.husband and family.wife—meaning great.
the grandparent's data, which was needed only by the child component, but because here they are nested within each other, these people
were nested, we had to pass data to both grand and parent, we also had to pass data to the parent
He had to pass it down, and only then did Chai get it, so guys, we call this prop drilling—meaning the props are being drilled down.
How, now again I show you, with the help of animation,
So guys, first of all, let's understand here that our Context API is based on React version 18, because in version 19 it has undergone a slight change.
So, what was there in React 18, then what changed in React 19—didn't I explain the entire journey, right? The video might be a bit long.
So, you see here, what happens is, first of all, there's a step, we need to create a context, you understand, it's in the Context API.
First, we need to create context, using the create context, and you've passed a null value here, simple.
This data was needed, the contract, so now inside the navbar component, if this
data, I need to read it, then you can see it very easily, with the
Thanks to the context hook, I can easily read that data for you.
Contracts, we will also look at practical aspects, but this is your third step.
Create a context, then use the provider component to access whatever data is available,
Pass it to him, and once it's passed, this provider
Inside the component, whatever components you add, we have already
I've added the navbar; now inside this component, I'm handling this data
I can access it very comfortably, basically, this data
I can read it, with the help of the context hook, but here
It's interesting, when we look at React version 19, it will also be
We don't need it anymore, okay? I mean, you'll find out soon.
Look, we've got it, see, the data came through, and I've got the name now.
Binod, okay, in the same way, let's say, we have one more
component, which we had placed inside it, and that's yours
Profile card, but the fact is, this component does not need this data
But this component here, inside this component, there is another
component that is being called, and that's your batch
component, you can see here in this manner, so
Here, has the Context API been useful or not? Please let me know.
Because, according to Rule, what does prop drilling say?
If there is a batch component inside the profile card, then
If the batch component needed data, I would have to...
You have to give that data profile card, then the profile card's thuros again
The batch component accesses it, but with the help of the Context API, such a thing is possible.
Nothing at all, just the batch component, my profile card component
was inside, but still, I didn't make any changes to the profile card component
I don't need to pass data; I can directly access it in my batch component
With the help of the use context hook, I can comfortably handle that data
I can read it, so, here it is, guys, your Context API and
Here are three steps, which you must not forget: first one, you need to create
the second one, that same context provides you with a provider component,
Inside which we have a value props, then whatever is inside that provider component
You, I mean, add it, just put it next to that component
Power comes today, that with the help of the use context hook, it reads that data
You can, so guys, this was your React version 18
You can see how smoothly it's running, and there's no problem at all.
Yeah, no problem, it's fine, but look, it's getting highlighted
User context dot provider, here's the story
It's interesting, okay, now I'll just stop it right here, I'll just stop it right here
So quickly, let me now show you a demo of the context, look here, up to now we have
Whatever I have read, I am now showing it to you live, okay? Your doubt will be cleared.
The first step is, we need to create a context, and we can create a context.
with the help of this create context, the one you react to with React
importing, simple, nothing big about it, and by default we have
I've placed a null value here, meaning that if the provider's value for tomorrow changes, then by default
You'll get a null value; then check this, your context is created
User context, I had already informed you about the second step: we need a provider, so user
The context provides the provider; look here, user context dot
Provider, then just take it, you have your own component, I mean, there we have a
Value props, we pass data inside it, and this is the data
The component access you are referring to
Basically, you can read it now; where this data came from, you will notice carefully here.
and why did I write that app component there, look here, because app
I have stored the data inside the component, using use
state hook, and this user here, I've already passed it on, meaning
Now I can get these two properties of the object.
Alright, I hope now that thing is becoming clear to you here.
Created context; we have an app component, inside the app we have this data
Alright, and then we have this provider, look at this, I hope you're clear now
Look here, inside return we have this, and I've repeatedly mentioned one thing
Inside this provider component, the component you add
Only and only those components can read this data
Vanna, I mean, Vanna, will anyone tell you that once
You've stored data inside the Context API, then any component can use it, I mean
You can read it, but that's not the case; inside the provider component, the component
Yes, they can read that data, this is your second part
Done, meaning you're ready now, whenever
Relax, with the help of the context hook, they'll get hold of him soon—just wait and see.
In the context hook, this user context we're talking about is essentially about this.
We have to pass here, okay, this is the third one.
The rule is, whatever component you have inside, like added,
Now, whenever they want to read this data, they can read it.
with the help of the use context hook, what you're seeing inside it is yours,
Whatever context you have, we have to pass it within it.
and comfortably, I can get it for you like this, user,
and this user.name, whatever it may be, I can easily access it here.
In the same way, we have this profile card; if you look, we have this profile card.
Here too, I can easily get that data using the context.
Look here, user, you know, and let's assume I didn't even need this either.
Still, I don't have any problem with it; I can also use it there on the batch, which is my component.
By the way, this part here, I haven't used the context hook here.
Because, we're here now, on our React version 19, look here, I already said I'd show it.
Now, here it is, guys, look at the data you're getting, Vinod, his email ID,
And here too, I'm getting data effortlessly, even in the Neb Bar, I'm receiving data so comfortably, how relaxed it is,
Alright, we've seen the data; now let's go back and look at the animation showing how to create context in React 18.
Pass data into the value of the provider component, and whenever we need to read it, we can do so using the help of context.
What's changed here now, 3, 2, 1, and if we're talking about React 19's Context API,
So, look, the first step, as always, is for you to create a context, okay? Inside the app component, we've already created the data, which we've already seen.
It used to work like that, providing a provider component, okay. In React 18, it was here, but boom, gone—look, it's gone, Tata bye-bye, the provider is gone.
Look here, the value is with Siddha, the user of Quantex.
If needed, I'll use the Neb bar
If user is present in the profile card
Look here, will you do it or not?
Otherwise, he could easily obtain it from Siddha's badge now.
Here we can clearly see
Check this out, traditional hook
It's not dead yet.
This legacy, there's nothing like that.
In React version 19, you still have this one, the use QuantumText hook
You can use this comfortably; there is no problem.
But React 19 is another good one
We have received the API.
Who now replaces it
And this is your User API.
And regarding the use of the API
I have already uploaded the files.
Now, click and see it
It will be great fun.
And here we can see Clellie
First user context
Now, using only the user API
Data will be entered in no time at all.
And what are its advantages?
This data is going smoothly.
And one thing you have
You must have noticed the provider
We don't need it anymore.
If we look at this, then
First, the user context provider
What we were writing just now
We no longer need to write it down.
Exactly, now you tell me, what's the benefit of this?
It's beneficial for me, Gais, if you speak.
The syntax is a dot.
You don't need to write the provider.
And the sem context's behavior
What we used to do for him
Now with React version 19, you can club it.
With the use of API, it will become even better.
So, Gais, that was your
Actually, Context API
And why did I say that
Missing
What is written here?
Context itself cannot be the provider
I mean, where we were looking at this
that context provides you with a provider component
Here it is now
React Version 19
He is here, the fraud.
If you ever don't see the provider
So don't say anything, just write it down.
No, React version 19
It will work now, do you have any questions?
What's the benefit, just say that much.
The less syntax, same idea, cleaner, context, API
So, we've come back to coding; please look carefully
What's the difference? Just a difference.
And the dot provider that was there, what about it?
I don't care about it anymore.
I don't have the depth of this here either.
So, what you saw in Thamnale
Context.provide gun
Goodbye, bye-bye, see you later — that's exactly what it means.
Pineley in React version 19
So you can see how far we've come here
How much have we understood today in this video
Yeah, have you seen the ASU of the prop drilling?
To fix it
Seen the Context API
Let's see how it was in React version 18
Now we know, don't we?
Yes, brother, what was that, and the few people who had forgotten it
Back to you instantly
They've refreshed, right?
Another thing that was part of the Yous context
Also, I mean, don't write this down
Look here, I'll also use this Yus.
So, the difference in React versions 18 and 19 is this
Now, the advantage of this is, look at this
If you've noticed, I've already done version 18.
Why hadn't it been changed? Because
The best YooS API
The advantage, the benefit, is that now you can use it
You can also use it conditionally
Even with the best conditions, you can now write this down.
What is the rule of Vanna Hook?
It won't work conditionally.
Always top level for you
Your condition
Because of this condition
Is this your API dependent?
You's context doesn't work here either
So this is React version 19
Where is the Yous API?
And dot provider
We don't need to write in context.
I really like the video.
If the subscriber has not yet subscribed, it will be frozen.
See you in the next video
The cows have been milked, so much has been collected.