Now we have learned how to consume multiple contests and I think you should already realize how ugly
it is to consume the contest in this way.
If they use contest hook we can literally use contests within the Functional Component with ease.
It's also much better to read and write.
Let's look at an example to understand it better.
And this time we go to the component B to consume.
I use a contest and a color contest so we will also display the name and also the color.
First we have to imposter use contest and.
We at
then in fact a complete and B.
We are going to use the use contest and we set a constant user is equal to use contest
but we've all got to import the contest so we need to import user contests and Carl Icahn cats
from
from the app and then we used to use contests to use to use the contacts and also we will use these
kinda contests
we should use the name contests rather than the user contests.
Now we are going to display the name using name and credit basis name and also color coded basis.
And because it uses name so we have to change to name rather than user and let's take a look.
Now you can see both component B and competency displayed a name and also the color.
But now you can see the new way of consuming the contest is better than the previous one.
And this is much easier to read.