So we're not to be adding handle Simon property to our farm, so for that purpose, just move above
your written statement and create a constant and just name it, handle it.
It is going to be an out of function, and it is going to take up an event which is again going to hand
some of the properties now or prevent default.
So what it will do is that it sends it to form the base properties that it is going to refresh our entire
page, so either prevent default is going to predict from that.
Default refreshment of a page.
Now let's just move it into a try catch block.
And we just put up an error.
If America is what I want to do is that I just go to the console.log and said that.
And before you do that, change the error status.
So we'll just sit at a.
Equal to our area.
And after this year's Council, A.
No, in our tribe, look, what they're going to do is that set up multiple states.
So if this first is going to be left colors, we assign colors a property of new values.
Which is again, going to take up color.
And all a parameter of 10, because initially one, 10.
So all values, it should be values.
Now will be setting up our state.
So a set of.
Should we call to?
Well, it should be said let's not collapse because we are not setting policy now is, I think, the
list.
Sectors.
OK, so we have added handlers and property function to Iraq.
Now it's time to give on merit.
So in our foreign component, we just give it our own submit and submit, not suspend.
It should be equipped to handle some.
Now I had to.
And we have configured our app funnel.
Now, this bit of more refactoring that we need to like, add value.
This is where they're going to hold the property or the state color, and it needs to have another property
that is own change property.
So we'll give it to orange property and this is going to be another function.
And what it's going to take is that an event and we want to target our said.
Carla said that it should be equal to either target or value.
So now we have refactor the code that we needed.
Now it's time to move into a other company that is certainly a single component, but before we do that,
before we just write any coding as a single component, I would like to refactor util strategies because
we are going to need it.
So just move into it, address and remove their dashboard from your explorer.
Now what I want to do is that create a function, and inside this function, we are going to name it
as hex converter.
And it is going to take a bath in that argument, let's see.
And what dysfunction is going to do is convert our values to hexadecimal values, so let's create a
variable and name it.
It should be cool to see dot to a string.
And since we're trying to convert into excited somebody to just pass it.
16.
So give it 16 and about on this very bitter turning.
This and it picks the dirt lint.
Equal to.
One then we wanted it on zero.
Otherwise we won't return.
X.
So if the hexavalent equal to one, then we want to return zero plus hex, otherwise they won't return
just simple hex hex value.
No, it's safe and we're going to use this hex converter.
Then there's going to be another function into our app and let's just name it.
IGB two Hex.
And this is going to take a three arguments red, a green and blue nine, the algae be what need to
do is that will be returning.
And using a hex converter in a RGV to DB to Hex, so we just to return and inside this return, what
they're going to do is that we'll be calling about hex converter and replacing it at.
And a G and a B.
And we'll be exporting IGP to now, so just to export the world.
So we have made a few deals for it or not.
Now let's just move into a single color component and configure it.