Hello, everyone, and welcome back.
Today, we're going to go over the things that we need to set up so that we can get
started on working on the user post components right here.
The first thing that we're definitely going to need is the user posts array.
Let's do that.
Let's create a constant here and call it user posts.
This will be also an array of objects and each object will represent a post.
We're going to set up a couple of items here.
Let's say that we set up around five.
Let's set those up.
What we're going to need with each object is going to be the user's first name.
In this case, we see on the design that it
is Alison, and we're going to need their last name, which is Becker here.
We're going to be needing the location as well, but it is something very weird here.
I'm just going to say that it's Boston, Ma.
We're going to need the number of likes,
the number of comments, and number of bookmarks.
Let's set those up.
Let's say that likes is 120 or let's make it 1,201 as it's written here.
Let's grab the comments and it can be 24
as it's given here and bookmarks should be 55.
Now let's give it an ID and let it be one.
Then let's copy this,
paste this one more time, and create one for Jennifer Wilkson.
Let's say that she's from Worcester, Massachusetts, and this could be
1,301 for us to differentiate it and this can be 25 and bookmarks can be 70.
Id definitely needs to be unique, so it has to be two.
Let's copy this one more time and paste it
here, and let's make an object for Adam Spera.
Let's say that he also lives in Worcester and his likes can be 100,
comments can be eight, bookmarks can be three, and ID should be three as well.
Let's copy this one more time and create another one.
I'll create one for myself.
You can create one for yourself.
I live in New York, so I'm going to say that.
Let's say my likes are 200 and my comments
are 16 and my bookmarks are six and my ID will be four.
Let's just create one more.
Let's say that it is Nicolas Namoradze and let's say he lives in Berlin, Germany.
Berlin, Germany.
Let's say that his likes are 2,000,
comments are 32, bookmarks are 12, and ID will be five.
Great. Now we're all set for our user posts.
I guess what we could do here is also
create some of the variables that we're going to need for user posts because we're
also going to be creating the infinite scroll for user posts.
Let's just copy this and paste it here one more time.
Instead of user stories, let's call it user posts everywhere.
I'm just going to actually copy this part
and I'm going to make sure that I change this and I change this here as well.
I'll change this here as well and here.
Let's do it here and here.
Now we have all of the variables set up.
In the next video, what we're going to be
doing is actually creating the user post component.
Just come back to the video whenever
you're ready and we're going to do that together.
Thank you so much for watching and see you in the next one.