Nicely done while we're still on the subject of the props.
I also want to show you two alternative ways how you can access them.
And if they all have to do with the way with the structure properties from the objects in JavaScript.
So if you would need to study up on that, please do so, because again, this has nothing to do with
Riak.
It is just a Joske where if I know whether I have this object and if I don't want to repeat myself where
I go, probs, dot, dot, dot, dot, I could adjust the structure of the properties where I can go
with const Aulet, so I'm going to go with const and then I'm just going to signal which properties
I would want.
Now keep in mind that of course I still need to access the same thing that I'm setting up as a props
and my parameters.
So these names need to match but it's not going to work.
I'm not I'm just going to say I would like to access image, I would like to access title as well as
the author.
So I go with IMG Thandi, the title.
And then comma, the author and I want to have access to each and every property in my props object.
Now I'm going to select multiple courses and I do that by pressing option and then a mouse.
And then, of course, I will remove the props.
I don't need them anymore.
And as you can see right now, I'm accessing each and every property and everything is still rendered.
So that's one of the options we can do.
And also, if you're familiar with the structuring, you also know that you can do directly where you're
setting up the function parameters.
So here's what I'm saying right now.
I'm saying, yes, I will get a object.
I know that my purpose, of course, is going to be an object.
And how will the structure here in the parameters instead?
So I don't even need to set it up equal to props, because now I'm just saying, yeah, there will be
a props object on this object is going to have these properties in there so we can simply say I am J
and title and then of the author.
Now, please keep in mind that both of them are exactly the same.
So the result is exactly the same.
These are just the syntax, is what you'll see from where some people prefer doing the structuring here.
Where did you set it equal to an object?
Or you can do it directly where you're setting up parameters.
Again, if you need to jog your memory, please check object the structuring in JavaScript because this
is not really specific.
Essentially this is JavaScript.
And if you are familiar with object structure, you already know that.
Of course we can.
The structure even more nested structures.
And in here, I'm not going to create a more complicated example just to showcase that.
But I will just want to let you know that if you are familiar with that, then yes, the same rules
would apply more.
For example, if in the author I would have more properties, essentially, if the author would be an
object, I would just place a colon and then I would keep on the structuring.
And yes, we will do that in some of the later project.
But for now, just remember that if you don't want to set up props, object in your parameter and then
access each property by typing the props and then that and props and that you can either structure them
inside the function body where you just look for specific properties that are in the object.
In my case I m g title and author, or we can simply the structure, the props object in the function
parameters.