1
00:00:00,210 --> 00:00:05,910
We'll get an alert to sort of the most important thing, which is the global context.

2
00:00:06,340 --> 00:00:13,020
So that is very, very important and that is that will be handling all of our context and all.

3
00:00:13,590 --> 00:00:17,640
Before that, I will have to create a folder inside the source folder.

4
00:00:18,420 --> 00:00:21,090
So that will be known as the context.

5
00:00:24,060 --> 00:00:28,550
And inside the context, I will create a file which will be named as.

6
00:00:30,260 --> 00:00:31,280
So things.

7
00:00:33,340 --> 00:00:37,620
Untaxed ideas that things are going to Sturgis.

8
00:00:38,040 --> 00:00:45,190
Let me grab the boilerplate code first with this snippet search, so I will type out of key.

9
00:00:45,550 --> 00:00:48,730
Now this is the act functional component within export.

10
00:00:49,210 --> 00:00:53,270
So the very first thing which will do is we'll import the hooks from the.

11
00:00:54,400 --> 00:01:00,790
So I will import legal status and the use contextual because those are the two hooks which are going

12
00:01:00,790 --> 00:01:01,240
to use.

13
00:01:01,690 --> 00:01:02,960
What will it mean for them?

14
00:01:02,990 --> 00:01:07,810
So the very first is the user status and the next will be using the U.S.

15
00:01:08,680 --> 00:01:11,570
Maybe to create content because we are going to create the context.

16
00:01:13,390 --> 00:01:20,140
Because the lose contact to context, use and use context, which is used when we are making use of

17
00:01:20,140 --> 00:01:21,940
the context in any other component.

18
00:01:22,240 --> 00:01:26,920
But here what they're doing is we are creating the context, so we'll try to create context.

19
00:01:28,250 --> 00:01:34,870
So create context, and this will be from the.

20
00:01:38,480 --> 00:01:38,990
That's all.

21
00:01:40,740 --> 00:01:45,030
Now, let us create the functions and create the context.

22
00:01:45,360 --> 00:01:47,550
So the first one was the use of state.

23
00:01:47,560 --> 00:01:51,300
Second was the creation context, which we imported from the rear.

24
00:01:52,020 --> 00:01:55,980
Now what we'll do is we'll export these are things context.

25
00:01:57,310 --> 00:01:59,650
So let us do the export.

26
00:02:02,980 --> 00:02:09,940
Actually, what we could have done or we could have imported the red arrow function because I think

27
00:02:09,940 --> 00:02:12,460
that would be better if we have done that.

28
00:02:12,550 --> 00:02:13,600
But no worries.

29
00:02:13,690 --> 00:02:21,580
We will continue to export concert and that will be to say things context and that will be equal to

30
00:02:21,580 --> 00:02:24,520
the create context.

31
00:02:25,430 --> 00:02:30,260
And now our global context has been created, which is named as these are things context.

32
00:02:30,750 --> 00:02:32,600
OK, that is good.

33
00:02:33,080 --> 00:02:38,900
Next, the function here is a provider who will add the word provider after this.

34
00:02:40,970 --> 00:02:41,500
Why that?

35
00:02:42,480 --> 00:02:48,240
Because this will be providing the value to other components, the global value to other components.

36
00:02:48,600 --> 00:02:57,300
So we'll be passing some props here and the props itself will be passed here as a props for props.

37
00:02:58,110 --> 00:03:06,450
And after that, inside of this, we will be creating some hooks now that will be cast and there will

38
00:03:06,450 --> 00:03:08,490
be a hook that does deployment or.

39
00:03:11,030 --> 00:03:11,620
All morning.

40
00:03:12,140 --> 00:03:13,940
And we will be sacked.

41
00:03:15,580 --> 00:03:16,070
On one.

42
00:03:18,190 --> 00:03:22,450
Ted, Comoroto, and this will be equal to the U.S.

43
00:03:23,210 --> 00:03:25,930
State and the initial value would be zero.

44
00:03:27,340 --> 00:03:31,330
Now what does this imply if we have given the initial value is zero?

45
00:03:31,330 --> 00:03:39,460
So that simply means the data Typekit are integer no, nor are defining other ways just type the initial

46
00:03:39,460 --> 00:03:39,850
value.

47
00:03:39,860 --> 00:03:42,550
What is the data type in that form?

48
00:03:42,550 --> 00:03:47,620
And it will be adapting that particular data type next concert.

49
00:03:49,570 --> 00:03:53,020
We will be giving the executing the.

50
00:03:54,320 --> 00:03:54,980
You been.

51
00:03:56,550 --> 00:03:58,920
Executing and executing.

52
00:04:01,620 --> 00:04:06,670
This is the function responsible for putting that particular variable, and now we'll be giving the

53
00:04:06,690 --> 00:04:07,440
you state.

54
00:04:09,810 --> 00:04:16,980
And now I will give the that type all the initial value, not here I have given Kylie, so that simply

55
00:04:16,980 --> 00:04:19,890
means that this variable is an object.

56
00:04:20,400 --> 00:04:20,880
Simple.

57
00:04:21,970 --> 00:04:27,490
OK, next, we'll be giving another thing, so that will be concert.

58
00:04:28,770 --> 00:04:29,520
Start.

59
00:04:31,210 --> 00:04:35,980
Any minute now, start animating is available.

60
00:04:36,160 --> 00:04:40,120
Next, we will be giving a function to serve this particular variable, so set.

61
00:04:41,720 --> 00:04:42,260
Dogged.

62
00:04:44,370 --> 00:04:52,620
Animate and start animate, and this will be equal to use state and start of this, I will give the

63
00:04:52,620 --> 00:04:56,250
initial initial value I have given as once.

64
00:04:57,310 --> 00:04:58,310
Now, what does this mean?

65
00:04:58,330 --> 00:04:59,800
Initial values fault.

66
00:05:00,070 --> 00:05:02,920
That simply means that this is a Boolean type.

67
00:05:03,580 --> 00:05:03,940
OK.

68
00:05:04,990 --> 00:05:08,870
You don't need to write another statement defining the variable.

69
00:05:08,890 --> 00:05:15,370
This is a stirring Boolean object or at a simply, you can just give the initial value in that form.

70
00:05:15,830 --> 00:05:17,260
I will write another function.

71
00:05:18,920 --> 00:05:23,060
Function, this will be to set the current time to set.

72
00:05:25,660 --> 00:05:33,370
But Diamond, and that will be our argument and argument active.

73
00:05:34,720 --> 00:05:35,050
Did.

74
00:05:38,500 --> 00:05:44,390
So inside of this, we will be calling a function that is the update execute update.

75
00:05:45,800 --> 00:05:48,560
Execute, which we just.

76
00:05:50,840 --> 00:05:51,830
Which will be creating.

77
00:05:51,890 --> 00:05:53,630
So there can be an update.

78
00:05:56,390 --> 00:05:59,840
XY update execute.

79
00:06:01,110 --> 00:06:08,010
Wolf, and inside of this, we'll be passing parade operators of the executing.

80
00:06:09,510 --> 00:06:17,010
You know, this one basically spread operator water does it like takes everything one by one and renders

81
00:06:17,010 --> 00:06:18,550
it so that desert.

82
00:06:18,630 --> 00:06:20,610
So now we'll be giving the active.

83
00:06:21,120 --> 00:06:25,340
And this will be the ActionScript Act posted.

84
00:06:25,380 --> 00:06:25,590
OK.

85
00:06:26,460 --> 00:06:28,560
And after this?

86
00:06:30,520 --> 00:06:31,390
We give our.

87
00:06:32,970 --> 00:06:39,590
So, Michael, and then we will be setting the time served, want and.

88
00:06:42,320 --> 00:06:43,660
Timeout time, basically.

89
00:06:44,660 --> 00:06:50,360
And we will be giving an argument inside this that would be crazy to think.

90
00:06:51,410 --> 00:06:51,590
Yeah.

91
00:06:52,510 --> 00:06:52,870
Simple.

92
00:06:54,330 --> 00:06:58,230
So next, we will be giving a function to start the animation.

93
00:06:58,650 --> 00:07:02,040
That function will be solely responsible for starting the animation.

94
00:07:02,490 --> 00:07:05,820
So let us give back so.

95
00:07:07,320 --> 00:07:13,290
Let me provide a comment stark animation function.

96
00:07:13,830 --> 00:07:14,070
Yeah.

97
00:07:15,840 --> 00:07:17,520
So that would be function.

98
00:07:19,350 --> 00:07:21,390
Start time.

99
00:07:22,270 --> 00:07:26,710
Not all of this functions, which we have done here, so that will be creating one by one.

100
00:07:27,460 --> 00:07:39,190
So inside of this, there is something or said start animation that start anime and that will be said

101
00:07:39,190 --> 00:07:39,730
to prove.

102
00:07:41,150 --> 00:07:45,800
Because the animation has been starved, started the time it has been started, so that start animation

103
00:07:45,800 --> 00:07:46,610
would be so good to.

104
00:07:48,090 --> 00:07:52,890
OK, next, we'll be starting the function to pause the animation.

105
00:07:53,520 --> 00:07:55,730
So this was this was for the start.

106
00:07:55,810 --> 00:08:01,080
Now this is what it was for pause animation function.

107
00:08:02,700 --> 00:08:06,210
OK, next, let's create a function for this.

108
00:08:08,290 --> 00:08:10,690
Function 4's animation.

109
00:08:11,810 --> 00:08:13,980
Or because I was.

110
00:08:16,660 --> 00:08:16,980
OK.

111
00:08:17,770 --> 00:08:22,060
Inside the pause timer will set the to start on the mission to false.

112
00:08:23,220 --> 00:08:23,670
Thank.

113
00:08:24,680 --> 00:08:32,150
Start any minute to follow, because now the diamond has been stopped so that the search started immigrant

114
00:08:32,150 --> 00:08:38,810
was set to false and isn't it next to past the counter?

115
00:08:39,200 --> 00:08:46,070
This was to pause the like the animation, but to pause the counter that is and the function which we

116
00:08:46,070 --> 00:08:46,760
are going to create.

117
00:08:47,780 --> 00:08:49,190
So let us do that.

118
00:08:50,160 --> 00:08:51,840
So was.

119
00:08:54,160 --> 00:09:00,220
Time to count, and after this, we will create a constant.

120
00:09:01,920 --> 00:09:05,640
France and the children, not even with children, is this.

121
00:09:05,730 --> 00:09:07,500
We passed it inside health.

122
00:09:09,070 --> 00:09:11,500
This one, this is what we are creating here.

123
00:09:13,180 --> 00:09:17,860
OK, so God's children and.

124
00:09:18,980 --> 00:09:26,270
This is equal to the remaining time remaining down.

125
00:09:27,250 --> 00:09:28,720
I think I made a typo.

126
00:09:29,290 --> 00:09:29,950
Yes.

127
00:09:31,870 --> 00:09:41,200
In meaning time as an argument, there's an object and in service that would be the second minutes,

128
00:09:42,910 --> 00:09:53,830
which is equal to Mad Dog floor and then a meaning done by 60 remaining time by.

129
00:09:55,130 --> 00:09:55,650
60.

130
00:09:56,450 --> 00:09:56,780
OK.

131
00:09:57,890 --> 00:10:03,080
Next, we'll be having caused seconds is equal to.

132
00:10:04,760 --> 00:10:10,540
The morning time morning, lots of 60 good.

133
00:10:11,540 --> 00:10:13,040
I think that's so good.

134
00:10:13,610 --> 00:10:15,740
OK, now next we'll return something.

135
00:10:15,860 --> 00:10:19,460
Now what will happen will do 10 minutes, as well as will return this second.

136
00:10:20,150 --> 00:10:25,670
So after this, we'll return this return and.

137
00:10:28,420 --> 00:10:31,030
Inside of this, there is.

138
00:10:32,470 --> 00:10:33,130
Minutes.

139
00:10:34,240 --> 00:10:34,870
And.

140
00:10:35,890 --> 00:10:36,940
After that.

141
00:10:38,460 --> 00:10:41,570
That would be these seconds.

142
00:10:47,260 --> 00:10:49,840
So this was in the curly braces.

143
00:10:55,310 --> 00:11:03,830
OK, so second, and that suit will provide a semicolon here, and the next will be creating the clear

144
00:11:03,980 --> 00:11:11,600
section storage like to clear the section and the clear the storage, so that function is responsible

145
00:11:11,600 --> 00:11:13,130
for clearing the storage in the section.

146
00:11:13,590 --> 00:11:15,230
So that will be creating the next video.
