1
00:00:00,390 --> 00:00:03,090
Let's take a look at the API that we're using to get our data.

2
00:00:03,120 --> 00:00:06,450
So the API is the one that you're using to fetch our data.

3
00:00:06,960 --> 00:00:11,700
I mean, the questions that we are getting as well as the correct answers and we can define the number

4
00:00:11,700 --> 00:00:12,760
of questions that we want.

5
00:00:12,780 --> 00:00:17,520
They can be considered the category of questions they consider, the difficulty level, whatever questions

6
00:00:17,520 --> 00:00:18,000
they should be.

7
00:00:18,360 --> 00:00:23,280
And if I just click on Generate API, you are, this is going to generate on which you're supposed to

8
00:00:23,280 --> 00:00:23,820
make a call.

9
00:00:24,360 --> 00:00:30,120
So let's just copy this and start creating our fetch method so that we can get our data.

10
00:00:30,460 --> 00:00:33,030
Now close this at vehicle terminal.

11
00:00:34,560 --> 00:00:39,090
And now will be creating such methods so that we can get our data from our API.

12
00:00:39,720 --> 00:00:45,240
The last piece of state that we want in our application and that is going to be for tomorrow, so this

13
00:00:45,240 --> 00:00:48,960
is going to be for our models that is going to define with our model is open or closed.

14
00:00:49,460 --> 00:00:50,250
So against.

15
00:00:53,000 --> 00:00:53,390
More.

16
00:00:54,530 --> 00:00:55,390
Said more.

17
00:00:57,160 --> 00:01:03,100
There's going to be equal to your state, and initially it is going to be clear to folks.

18
00:01:06,980 --> 00:01:08,720
All right, so here we are having a models.

19
00:01:10,720 --> 00:01:12,130
OK, let's get rid of them.

20
00:01:13,860 --> 00:01:20,800
Now, by setting up a contest suggests before we add any fetch method to it, so let's set up a context

21
00:01:20,820 --> 00:01:24,150
address for that purpose and we'll be creating a context.

22
00:01:24,330 --> 00:01:28,170
So we're right above your ad that provide a reader contest.

23
00:01:29,690 --> 00:01:30,350
Context.

24
00:01:32,160 --> 00:01:35,970
Which is going to be equal to the average or create context.

25
00:01:37,930 --> 00:01:40,330
All right, so here is a context has been created.

26
00:01:41,340 --> 00:01:43,930
I'd say, you know, come down, we need you.

27
00:01:45,260 --> 00:01:46,850
Constants or states?

28
00:01:47,150 --> 00:01:48,650
And give it a written statement.

29
00:01:52,480 --> 00:01:58,030
Now said this written statement, we are going to define the data that we want to send outside and inside

30
00:01:58,030 --> 00:02:00,940
this written statement, we're going to have an app context provider.

31
00:02:01,900 --> 00:02:09,610
So context note provider now process now inside this is going to be the children.

32
00:02:10,590 --> 00:02:11,970
So give it children.

33
00:02:19,440 --> 00:02:22,530
All right, so now this contest is going to hold different values.

34
00:02:22,860 --> 00:02:25,140
Now we even need to explore this, right?

35
00:02:25,710 --> 00:02:26,910
So in order to export.

36
00:02:29,890 --> 00:02:30,940
So export.

37
00:02:33,850 --> 00:02:34,450
Bronzed.

38
00:02:38,290 --> 00:02:39,730
News, global context.

39
00:02:46,500 --> 00:02:48,150
Which, again, is a narrow function.

40
00:02:53,170 --> 00:02:54,460
And this is going to get done.

41
00:02:58,770 --> 00:03:00,000
Use context.

42
00:03:06,180 --> 00:03:11,830
It goes to context, all right, so we need to import a U.S. context as well from a React model now.

43
00:03:11,860 --> 00:03:17,350
We'll also be needing to explore the appropriate context as well that are providers.

44
00:03:17,350 --> 00:03:22,110
So let's explore that context as well as a provider.

45
00:03:23,580 --> 00:03:28,350
All right, so we are an agreement to the import use contest from rear.

46
00:03:29,030 --> 00:03:31,210
So let's import I use context.

47
00:03:36,910 --> 00:03:42,280
Now, before we move to create a fetch method, let's just remove this react.

48
00:03:42,730 --> 00:03:45,130
So there are basically two ways to solve this.

49
00:03:45,340 --> 00:03:46,390
They're going to have the three.

50
00:03:46,390 --> 00:03:51,100
I'm not going to add context and import the act from here.

51
00:03:54,770 --> 00:04:02,060
The other way around is that I'll just remove this react as well as this reactor or create context and

52
00:04:02,060 --> 00:04:05,030
remove this react and just import create context from react.

53
00:04:05,040 --> 00:04:07,220
So any saying you can choose any one of the methods.

54
00:04:07,800 --> 00:04:11,180
So equals to create context and we are importing.

55
00:04:11,180 --> 00:04:11,810
I used it.

56
00:04:11,810 --> 00:04:14,150
I use context as well as I create context.

57
00:04:14,570 --> 00:04:17,660
And apart from it, we are also will also be discharging children.

58
00:04:18,170 --> 00:04:22,970
So right inside these bases, just call in your children.

59
00:04:23,810 --> 00:04:24,290
All right.

60
00:04:24,290 --> 00:04:26,090
So we are now in a boilerplate.

61
00:04:26,540 --> 00:04:27,440
Boilerplate is ready.

62
00:04:28,040 --> 00:04:34,790
So right above your return statement inside the app will be creating a fetch method so that we can gather

63
00:04:36,200 --> 00:04:37,250
data from an API.

64
00:04:38,180 --> 00:04:40,730
So let's create the fetch method.
