We'll get an alert to sort of the most important thing, which is the global context.
So that is very, very important and that is that will be handling all of our context and all.
Before that, I will have to create a folder inside the source folder.
So that will be known as the context.
And inside the context, I will create a file which will be named as.
So things.
Untaxed ideas that things are going to Sturgis.
Let me grab the boilerplate code first with this snippet search, so I will type out of key.
Now this is the act functional component within export.
So the very first thing which will do is we'll import the hooks from the.
So I will import legal status and the use contextual because those are the two hooks which are going
to use.
What will it mean for them?
So the very first is the user status and the next will be using the U.S.
Maybe to create content because we are going to create the context.
Because the lose contact to context, use and use context, which is used when we are making use of
the context in any other component.
But here what they're doing is we are creating the context, so we'll try to create context.
So create context, and this will be from the.
That's all.
Now, let us create the functions and create the context.
So the first one was the use of state.
Second was the creation context, which we imported from the rear.
Now what we'll do is we'll export these are things context.
So let us do the export.
Actually, what we could have done or we could have imported the red arrow function because I think
that would be better if we have done that.
But no worries.
We will continue to export concert and that will be to say things context and that will be equal to
the create context.
And now our global context has been created, which is named as these are things context.
OK, that is good.
Next, the function here is a provider who will add the word provider after this.
Why that?
Because this will be providing the value to other components, the global value to other components.
So we'll be passing some props here and the props itself will be passed here as a props for props.
And after that, inside of this, we will be creating some hooks now that will be cast and there will
be a hook that does deployment or.
All morning.
And we will be sacked.
On one.
Ted, Comoroto, and this will be equal to the U.S.
State and the initial value would be zero.
Now what does this imply if we have given the initial value is zero?
So that simply means the data Typekit are integer no, nor are defining other ways just type the initial
value.
What is the data type in that form?
And it will be adapting that particular data type next concert.
We will be giving the executing the.
You been.
Executing and executing.
This is the function responsible for putting that particular variable, and now we'll be giving the
you state.
And now I will give the that type all the initial value, not here I have given Kylie, so that simply
means that this variable is an object.
Simple.
OK, next, we'll be giving another thing, so that will be concert.
Start.
Any minute now, start animating is available.
Next, we will be giving a function to serve this particular variable, so set.
Dogged.
Animate and start animate, and this will be equal to use state and start of this, I will give the
initial initial value I have given as once.
Now, what does this mean?
Initial values fault.
That simply means that this is a Boolean type.
OK.
You don't need to write another statement defining the variable.
This is a stirring Boolean object or at a simply, you can just give the initial value in that form.
I will write another function.
Function, this will be to set the current time to set.
But Diamond, and that will be our argument and argument active.
Did.
So inside of this, we will be calling a function that is the update execute update.
Execute, which we just.
Which will be creating.
So there can be an update.
XY update execute.
Wolf, and inside of this, we'll be passing parade operators of the executing.
You know, this one basically spread operator water does it like takes everything one by one and renders
it so that desert.
So now we'll be giving the active.
And this will be the ActionScript Act posted.
OK.
And after this?
We give our.
So, Michael, and then we will be setting the time served, want and.
Timeout time, basically.
And we will be giving an argument inside this that would be crazy to think.
Yeah.
Simple.
So next, we will be giving a function to start the animation.
That function will be solely responsible for starting the animation.
So let us give back so.
Let me provide a comment stark animation function.
Yeah.
So that would be function.
Start time.
Not all of this functions, which we have done here, so that will be creating one by one.
So inside of this, there is something or said start animation that start anime and that will be said
to prove.
Because the animation has been starved, started the time it has been started, so that start animation
would be so good to.
OK, next, we'll be starting the function to pause the animation.
So this was this was for the start.
Now this is what it was for pause animation function.
OK, next, let's create a function for this.
Function 4's animation.
Or because I was.
OK.
Inside the pause timer will set the to start on the mission to false.
Thank.
Start any minute to follow, because now the diamond has been stopped so that the search started immigrant
was set to false and isn't it next to past the counter?
This was to pause the like the animation, but to pause the counter that is and the function which we
are going to create.
So let us do that.
So was.
Time to count, and after this, we will create a constant.
France and the children, not even with children, is this.
We passed it inside health.
This one, this is what we are creating here.
OK, so God's children and.
This is equal to the remaining time remaining down.
I think I made a typo.
Yes.
In meaning time as an argument, there's an object and in service that would be the second minutes,
which is equal to Mad Dog floor and then a meaning done by 60 remaining time by.
60.
OK.
Next, we'll be having caused seconds is equal to.
The morning time morning, lots of 60 good.
I think that's so good.
OK, now next we'll return something.
Now what will happen will do 10 minutes, as well as will return this second.
So after this, we'll return this return and.
Inside of this, there is.
Minutes.
And.
After that.
That would be these seconds.
So this was in the curly braces.
OK, so second, and that suit will provide a semicolon here, and the next will be creating the clear
section storage like to clear the section and the clear the storage, so that function is responsible
for clearing the storage in the section.
So that will be creating the next video.