1 00:00:00,330 --> 00:00:04,140 Nicely done while we're still on the subject of the props. 2 00:00:04,530 --> 00:00:10,320 I also want to show you two alternative ways how you can access them. 3 00:00:10,920 --> 00:00:18,620 And if they all have to do with the way with the structure properties from the objects in JavaScript. 4 00:00:18,990 --> 00:00:24,720 So if you would need to study up on that, please do so, because again, this has nothing to do with 5 00:00:24,720 --> 00:00:25,200 Riak. 6 00:00:25,560 --> 00:00:33,870 It is just a Joske where if I know whether I have this object and if I don't want to repeat myself where 7 00:00:33,870 --> 00:00:40,710 I go, probs, dot, dot, dot, dot, I could adjust the structure of the properties where I can go 8 00:00:40,710 --> 00:00:46,410 with const Aulet, so I'm going to go with const and then I'm just going to signal which properties 9 00:00:46,410 --> 00:00:46,950 I would want. 10 00:00:47,280 --> 00:00:55,440 Now keep in mind that of course I still need to access the same thing that I'm setting up as a props 11 00:00:55,890 --> 00:00:57,680 and my parameters. 12 00:00:58,020 --> 00:01:01,500 So these names need to match but it's not going to work. 13 00:01:01,800 --> 00:01:07,830 I'm not I'm just going to say I would like to access image, I would like to access title as well as 14 00:01:07,830 --> 00:01:08,330 the author. 15 00:01:08,700 --> 00:01:11,550 So I go with IMG Thandi, the title. 16 00:01:12,480 --> 00:01:20,740 And then comma, the author and I want to have access to each and every property in my props object. 17 00:01:21,210 --> 00:01:28,610 Now I'm going to select multiple courses and I do that by pressing option and then a mouse. 18 00:01:29,280 --> 00:01:31,790 And then, of course, I will remove the props. 19 00:01:31,800 --> 00:01:32,930 I don't need them anymore. 20 00:01:33,210 --> 00:01:39,210 And as you can see right now, I'm accessing each and every property and everything is still rendered. 21 00:01:39,630 --> 00:01:41,490 So that's one of the options we can do. 22 00:01:41,760 --> 00:01:49,110 And also, if you're familiar with the structuring, you also know that you can do directly where you're 23 00:01:49,110 --> 00:01:51,180 setting up the function parameters. 24 00:01:51,480 --> 00:01:52,950 So here's what I'm saying right now. 25 00:01:53,220 --> 00:01:56,600 I'm saying, yes, I will get a object. 26 00:01:57,000 --> 00:02:00,230 I know that my purpose, of course, is going to be an object. 27 00:02:00,420 --> 00:02:04,810 And how will the structure here in the parameters instead? 28 00:02:05,640 --> 00:02:11,040 So I don't even need to set it up equal to props, because now I'm just saying, yeah, there will be 29 00:02:11,040 --> 00:02:18,650 a props object on this object is going to have these properties in there so we can simply say I am J 30 00:02:19,350 --> 00:02:22,080 and title and then of the author. 31 00:02:22,350 --> 00:02:26,720 Now, please keep in mind that both of them are exactly the same. 32 00:02:27,030 --> 00:02:28,750 So the result is exactly the same. 33 00:02:29,340 --> 00:02:36,840 These are just the syntax, is what you'll see from where some people prefer doing the structuring here. 34 00:02:37,170 --> 00:02:39,150 Where did you set it equal to an object? 35 00:02:39,510 --> 00:02:43,560 Or you can do it directly where you're setting up parameters. 36 00:02:43,570 --> 00:02:50,760 Again, if you need to jog your memory, please check object the structuring in JavaScript because this 37 00:02:50,760 --> 00:02:52,050 is not really specific. 38 00:02:52,050 --> 00:02:54,120 Essentially this is JavaScript. 39 00:02:54,390 --> 00:02:59,160 And if you are familiar with object structure, you already know that. 40 00:02:59,160 --> 00:03:01,080 Of course we can. 41 00:03:01,380 --> 00:03:04,530 The structure even more nested structures. 42 00:03:04,830 --> 00:03:10,230 And in here, I'm not going to create a more complicated example just to showcase that. 43 00:03:10,500 --> 00:03:15,930 But I will just want to let you know that if you are familiar with that, then yes, the same rules 44 00:03:15,930 --> 00:03:16,920 would apply more. 45 00:03:16,930 --> 00:03:23,040 For example, if in the author I would have more properties, essentially, if the author would be an 46 00:03:23,040 --> 00:03:27,330 object, I would just place a colon and then I would keep on the structuring. 47 00:03:27,480 --> 00:03:32,030 And yes, we will do that in some of the later project. 48 00:03:32,310 --> 00:03:38,970 But for now, just remember that if you don't want to set up props, object in your parameter and then 49 00:03:38,970 --> 00:03:46,740 access each property by typing the props and then that and props and that you can either structure them 50 00:03:47,010 --> 00:03:54,110 inside the function body where you just look for specific properties that are in the object. 51 00:03:54,120 --> 00:04:02,250 In my case I m g title and author, or we can simply the structure, the props object in the function 52 00:04:02,250 --> 00:04:02,970 parameters.