OK, so now let's go ahead and give some functionality to the little button inside Pomodoro.
Let me see if this CCIs.
And I've come here and now I will be adding some functionality here after the Pomodoro thing will go
on up to the site Pomodoro.
So here.
For the very first thing is that we will import some things.
So what will be important is the U.S. trade talks.
The very first thing is we'll be importing the used to talk in the US context.
And after that, we will be moving further.
So let me do that here.
You can import into one line, you can write three export U.S. trade while defining that is also perfect,
but just define what want like import ones and then forget that is the best thing.
I tried again and again use context and use.
It.
OK.
The important part is done.
Now what will do?
It will create a hook right after the function, will create a hook that will be Konst and.
Let me explain in the structure of the straight talk.
To hear that is available.
Well, for example, I'm creating a new standard variable here and here that is a function which is
responsible to change that variable and it will be set new timer.
And this will be equal to use state.
You step inside of this.
I will be having some initial values to this particular object.
Now how will we know this is an object like whatever we provide inside this, you state this year while
initializing, if I provide her to a fault that will be a boolean.
If I provide her quotations, then it will be a string.
If I provide here square brackets that then it would be an error.
If I provide her calibrations, then it would be an object.
So you don't need to, like, define it separately like anywhere else.
You can just provide that particular symbol that corresponds to that particular data type.
Then it would be defined automatically.
You don't need to work extra work to define that.
OK.
So now I've done a Columbus's here, that means this is an object.
But OK, so now let me give some initial value and initial thing to this object.
So the first one would be work.
And our broadcast.
It will be just fun and.
We will give our value of point to.
In the beginning.
That then will have the shark is a short break.
But it will be point one.
And then it will be a long.
Order will be four and five next field be active.
Now what is active like when we go to the page and we see.
So what would be the active tab open by default?
That will be work?
And if the string.
Oh, I forgot to put on my hat, I put a semicolon or semicolon instead of comma, so that should not
be done, otherwise it throw an error.
OK.
I think we are done with this now.
We will create another constant.
Then we will be getting it from another like we'll be creating global context and with the help of the
global context, will be creating this further.
So what will be the global context, it will be settings context to look or less, are things going
to context which will be creating in a minute?
But that isn't just to do some things better than the concert and update.
And execute.
And this is a call to use in text and inside of this, that it would be things.
Context.
So now, after the certain context will create a constant.
Now this context will be responsible for handling the changes in the input as simple as that.
Like whenever the user typed anything inside the input field.
So this handle chain will be responsible for that content handle change.
And don't change that would being put in put.
And insert of this, that it would be what we want to create.
Now that would be concert.
And and.
Name and defend.
This is a completely random thing, and we will give input out target number.
Now there will be a huge statement.
Oops!
After that.
Be having a suit, certainly.
Now, what is this sweet statement doing here?
This will be specifying the action of the buttons, like when it's work, what should be the functionality,
what should be the variable that is restarting, when it is break.
Language break long breaks from short break.
According to the Act, this will be functioning.
So inside this switch will have the new.
Name is the thing that will be like bidding.
So curly braces.
And inside of here, we will hear the case.
Now in like, remember like just imagine the work.
So for that, what we need to do.
Oh, man.
Yeah, now for one, what we need to do is we need to set the new timer.
So.
New.
What?
And.
The start of this will use the word open to.
That will be the new timer.
Oh, man.
And now.
So inside this sad new time world, there are so many of the elements inside this object who will be
handling only this work one when it works, then we have this talk, then we have the long, then we
have the activism before that, that is for sure.
So.
Now we will tie further.
Who will be doing this work?
Bars and.
And we'll give you.
Well, next, we'll be creating another case, this was for the workers.
Now after that, we'll be giving the brakes treatment.
No break.
And after the break, I will be giving another guest, so this article is.
Sort.
But it.
That new.
I would.
And then again, we'll use the spirit operator that will be new.
I'm.
And then we'll give this for this short one for Shark.
Short.
And that will be of value.
OK.
So again, we will give a break after this.
Is it the long break?
And this will be applicable for that, Neil Diamond, and this will be applicable for.
Neil, I am old and long.
It's really long.
Fast.
And.
And we'll pause of value inside.
After that break.
Norman Riggs treatment and we served.
So, Bill, now we have given the functionality to like which tab we are switching.
And according to which switch the tab, the function will be executed now.
Will provide a handle some.
Like when we pressed the button and that time about down to what it will be doing before that will be
providing some.
Things now.
Let's do it.
After the break and after this, all all is done will create another function that will be concert.
And I'll.
Some.
And that will be we will be creating a federal function now for this.
So.
That would be part of the function and.
Basic function now here we will write.
A court now, basically what is the general natural behavior of a form, if you know an enrichment?
Also what it does is that when and where do we submit a form?
So it's the natural tendency is to rephrase the entire page.
That said, there's the basic functionality of any form.
Like, whenever we are, like, for example, we provide it in the settings that we rent and we give
the timer and we set the time, so it will refresh the page, but that's not what we want.
We don't want the page to refresh.
So for that, we will make use of this very nice and useful double scoop property.
We will pass EA or event here and here.
After this, we will type e dot.
They weren't.
D Ford.
That's it.
And after this, we'll.
Update execute.
And will pass new family inside this.
That is it.
So this will prevent it from like.
Surrendered from the.
Reloading and then it will be done now we'll make use of all of the songs in the service, so we'll
do that in the next video.