Not bad, not bad.
We have the server functionality in place.
So now let's start dealing with our get all jobs functionality on the frontend.
And the first thing that we want to do is going to be extremely, extremely straightforward in the initial
state in the context of these properties, jobs, which is going to be in A. In the beginning that total
jobs, which by default is going to be one that it will add a number of pages which in the beginning
are going to have a default value will be one.
And you can already probably put two and two together where since you are getting these values from
the server.
Once we make our request, we'll update them.
Basically, whatever jobs I'm getting, I provide these values.
And also since eventually we will have pagination.
And since normally you start by generating from the first page, essentially you get the data for the
first page.
Yes.
Will Heart Code page is equal to one.
Again, this problem is not going to make much sense at the moment.
But don't worry, if you have been watching my two daughters, you know that I always come back to things
anyway, so this is going to be the case where, yes, we'll set up this page just because it's easier
to set up all our functionality this way, since I don't have to again run back and start setting up
everything as far as this one property all over my application and for time being, we'll just go with
page equals to one.
And if this is a little bit confusing to worry, once we start by generating, I will come back to this
one.
So let's do that.
We're going to go right now to the client online.
More specifically, I'm looking for the context app context one, and let's scroll up and what we're
looking for here.
Hmm.
OK, let's see.
Let's say let's see in the initial state right after, depending one.
Here's what I want to do.
I want to go with my jobs, like I said, equals to an empty array.
Typekit default setup for now, and we want to go with total jobs, which is going to be equal to zero.
So that's the default rather than let's go with number of pages.
That's going to be equal to one as well.
And then page by default will all be getting the page number one.
And with this in place now, we can start setting them and get all jobs request.