1 00:00:01,000 --> 00:00:05,830 Understanding how to fetch data inside of a U.S. factory and then use it to update some piece of state 2 00:00:05,830 --> 00:00:08,230 is absolutely core in the world of react. 3 00:00:08,560 --> 00:00:10,300 So let's get a little bit of practice with it. 4 00:00:10,750 --> 00:00:16,040 In this exercise, you're going to be fetching a list of users from an outside existing API. 5 00:00:16,630 --> 00:00:19,780 There is a useful for that API already inside this exercise. 6 00:00:20,150 --> 00:00:25,870 All you have to do is make use of axios to make a get request that your URL that's going to give you 7 00:00:25,870 --> 00:00:28,030 back an array of user objects. 8 00:00:28,600 --> 00:00:33,670 You'll then use that array of objects to update the user's piece of state, which has already been set 9 00:00:33,670 --> 00:00:34,170 up for you. 10 00:00:34,720 --> 00:00:39,550 Once you do that, you should see the entire application start to come to life and list of users should 11 00:00:39,550 --> 00:00:42,160 automatically be rendered out over here on the right hand side. 12 00:00:42,820 --> 00:00:47,410 So all you really have to worry about is the user effect function and adding in a little bit of code 13 00:00:47,410 --> 00:00:53,170 there to make the request and then use it to update that user's piece of state to go ahead and give 14 00:00:53,170 --> 00:00:53,840 this a shot. 15 00:00:53,860 --> 00:00:55,830 We'll take a look at a solution in just a moment.