In this video we're gonna go over a really quick solution here.
So let's get to it.
The first we need to do is pass in a new prop to communicate from the image screen down to the image
detail.
So here's my image screen right here.
For each my new image detail components I'm showing inside of here.
I'm going to add in a new prop and I'm going to call it score.
Now this is a javascript expression not quite a variable that we are referring to whenever we want to
assign a number to a prop it has to be assigned inside of a set of curly braces.
So for this new one I'll give or the first one I'll give it a score of nine.
But the second one I'll give it a score of seven and I'll be generous on the last one I'll do a score
of 10.
Like so remember we are deciding what property name to use.
It's got a band called score or score for image or whatever else you want it to be.
Just has to be something that makes sense to you so we can now save this file and then go over to our
image detail.
Now we can try to make use of that new prop it's going to add in a new text element underneath the existing
one and I'll give it the text image score a dash and then I'll print out props dot score like so now
we can save this.
And if we test it out once again I'll see image score of nine seven in 10.
Very good.
Last thing that we could do as a little Optum has to be optional optimization to our image detail.
Remember we don't necessarily have to refer to the entire props object right here if we want to.
We could de structure off only the properties we care about from it.
So I could replace props are right there with a set of parentheses and curly braces inside.
And then just reference the different properties that I want to get access to.
So in that case would be an image source title and score and then we can remove three references to
props that we have inside of our function.
So I'll do it.
Prop stock prop Scott and prop Scott.
So I have no more references to props inside of my component anymore.
Again this is a hundred percent optional.
You might see is done in the community very frequently just because it saves a little bit of typing.
So now we can say this once again and we should still see everything up here as expected and I'll do
a quick test on Android as well.
I'll go to my image demo and yep looks good.
All right cool so that's props.
And we've got a good example in.
So once again let's take a pause right here and move on to our next topic in the next video.