Well, this would be a very quick and easy solution, all we really need to do is add in an unclick
event handler to the icon element.
Whenever user clicks on it, we need to call the props dot on Dismas function.
So on the icon element, I'll first begin by giving myself just a little bit of space here.
Well, then add in my unclick up and inside there, remember, we can either put in an arrow function
and call Rob Scott on dismiss manually like so, or we can just pass a direct reference to Prop Scott
on Dismas instead.
And so if you want to do that little shortcut, we would take out the entire function.
And place in there only from start on Dismas without any parentheses after it.
So now if I open the Motal, I should be able to click on the X Internet if the model closes.
Looks good.
I'm going to check my solution and let's see how we are doing.
There we go.
All right.
That looks good.
Let's take a pause here and continue with our application in the next video.