In the previous probably already experienced the use of higher order component to make the Nephi the
function to push to another page.
And this is the higher order functions, the higher order components that we used in the previous letterer.
And now we are going to create our own higher order components.
So we create a new folder and we Memphis s kind of folk and inside the functions into AGYEMAN, we are
passing the prop to component.
And inside the documentation, it already set a higher order component.
It's now monistat these for we using the component logic.
And it is a function that takes the components and we turn a new component inside a document.
It also teach you how to we turned a new component.
So we are going to do this in our app.
And now we create a way that we have different cars, but we are not using the red, blue or green because
in blue strip, the color theme is like this.
So we copy all of this and we pace it here.
And since there are six different type of colors.
So we are going to randomized between zero and five.
And we copied this one.
And page it inside.
We turn and the cost.
Lam going to pass this color and this will rob the temple.
Then we are going to empower and we will also pass the props inside the raptor components.
Now we can go to the components and inside the about.
We are going to import the high order component.
And here we are going to import the colorful from the higher order component, foda and colorful and
in export.
We are going to wrap the about page with colorful and receive it.
We can see there is no effect on the op ed page.
And just because there are some mistake we just made and there should be no talk in front of the cost.
So we have to cancel all the thought and now we can see colors on the page.
Maybe we have to come and do it, said Tom.
Our function inside the death bar and now every time we refresh the page.
It will change to different colors.
So this is how they hire order component work.