In this part we are going to teach about the use we do.
And this is just a brand new app.
There's nothing here and in this part we are trying to use the we threat.
Actually this is a plus trap.
So now we call PD code and paste it in our terminal
and we also have to import the CSF file but first we have to create a new folder called components and
under the components we are going to create a counter start to add and we create these as a functional
component and then we import the CSX here and we have to import their use.
We do the two type of components we are going to use.
One is to put on groups and the other use deep patterns.
And since that we are going to add a button groups that can increase and decrease.
And also we set the counter.
So just like this we have to import from the we add strap so bad to the content of the ESC The important
button and also add a button groups.
Now we can actually copy this one and also paste it here and then we at the Tala
and this is finger the kind of thing you can do to add a bootstrap document and see which one each represent
a red color.
Which one is represent the black color.
Now we have to import the component to convert from the component counter
and then we can replace the defined to contact.
We forget to install the bootstrap.
So we have to also important bootstrap since we thought the era of can't be solved the Bush trap of
the CSA says
now we will refresh the Web site we already can see the buttons left middle and right.
And we have to replace it with another name which is increment
document.
And also we said now we are going to create a you know sold stake
and also we have to create a redo with a
and free phase us which is increment decrement.
And also we set
for the default to one we have to return to current state and for increment we have to return the stage
plus 1 and declare month we have to return to stage minus one.
And for that we said we have to return the initial state.
So inside the counter by going to use the use we do with a
put there.
We do so here and also the initial state where we use dispatch here a real disparity astronauts for
example we will one day increment or decrement astronauts and the stage we turn will become the count.
So I'll of the top of the page we can create a test which show the count and add a button.
We are going to add a functions
now for the increment it will dispatch the increment aspirins and it will return to stay to the count
and for that we said it will dispatch the reset actions and we turn the initial stage to the count.
Now let's take a look when we increase the number we'll be increasing when we decrease the number will
decrease.
And when we we said we'll return to the initial stage which is zero.