WEBVTT

00:00:00.560 --> 00:00:02.540
Hello, everyone, and welcome back.

00:00:02.570 --> 00:00:08.660
Today, we're going to go over the things
that we need to set up so that we can get

00:00:08.690 --> 00:00:13.010
started on working on the user
post components right here.

00:00:13.040 --> 00:00:17.780
The first thing that we're definitely
going to need is the user posts array.

00:00:17.810 --> 00:00:19.140
Let's do that.

00:00:19.170 --> 00:00:22.620
Let's create a constant here
and call it user posts.

00:00:22.650 --> 00:00:27.940
This will be also an array of objects
and each object will represent a post.

00:00:27.970 --> 00:00:31.120
We're going to set up
a couple of items here.

00:00:31.150 --> 00:00:34.260
Let's say that we set up around five.

00:00:34.290 --> 00:00:35.860
Let's set those up.

00:00:35.890 --> 00:00:40.740
What we're going to need with each object
is going to be the user's first name.

00:00:40.770 --> 00:00:42.880
In this case, we see on the design that it

00:00:42.910 --> 00:00:49.220
is Alison, and we're going to need
their last name, which is Becker here.

00:00:49.250 --> 00:00:53.800
We're going to be needing the location as
well, but it is something very weird here.

00:00:53.830 --> 00:00:57.580
I'm just going to say
that it's Boston, Ma.

00:00:57.610 --> 00:01:00.000
We're going to need the number of likes,

00:01:00.000 --> 00:01:01.900
the number of comments,
and number of bookmarks.

00:01:01.930 --> 00:01:03.240
Let's set those up.

00:01:03.270 --> 00:01:13.340
Let's say that likes is 120 or
let's make it 1,201 as it's written here.

00:01:13.360 --> 00:01:15.360
Let's grab the comments and it can be 24

00:01:15.390 --> 00:01:19.740
as it's given here and bookmarks
should be 55.

00:01:19.770 --> 00:01:23.740
Now let's give it an ID and let it be one.

00:01:23.770 --> 00:01:25.460
Then let's copy this,

00:01:25.490 --> 00:01:32.020
paste this one more time,
and create one for Jennifer Wilkson.

00:01:32.050 --> 00:01:38.380
Let's say that she's from Worcester,
Massachusetts, and this could be

00:01:38.410 --> 00:01:44.020
1,301 for us to differentiate it and this
can be 25 and bookmarks can be 70.

00:01:44.050 --> 00:01:47.180
Id definitely needs to be unique,
so it has to be two.

00:01:47.200 --> 00:01:49.060
Let's copy this one more time and paste it

00:01:49.090 --> 00:01:54.060
here, and let's make
an object for Adam Spera.

00:01:54.090 --> 00:02:00.000
Let's say that he also lives in Worcester
and his likes can be 100,

00:02:00.030 --> 00:02:05.490
comments can be eight, bookmarks can be
three, and ID should be three as well.

00:02:05.520 --> 00:02:09.600
Let's copy this one more time
and create another one.

00:02:09.630 --> 00:02:12.140
I'll create one for myself.

00:02:12.160 --> 00:02:13.600
You can create one for yourself.

00:02:13.630 --> 00:02:18.060
I live in New York,
so I'm going to say that.

00:02:18.090 --> 00:02:21.120
Let's say my likes are 200 and my comments

00:02:21.150 --> 00:02:25.940
are 16 and my bookmarks are
six and my ID will be four.

00:02:25.970 --> 00:02:27.980
Let's just create one more.

00:02:28.010 --> 00:02:36.140
Let's say that it is Nicolas Namoradze and
let's say he lives in Berlin, Germany.

00:02:36.170 --> 00:02:38.100
Berlin, Germany.

00:02:38.130 --> 00:02:40.450
Let's say that his likes are 2,000,

00:02:40.480 --> 00:02:45.020
comments are 32,
bookmarks are 12, and ID will be five.

00:02:45.040 --> 00:02:50.020
Great.
Now we're all set for our user posts.

00:02:50.050 --> 00:02:52.700
I guess what we could do here is also

00:02:52.720 --> 00:02:56.600
create some of the variables that we're
going to need for user posts because we're

00:02:56.630 --> 00:03:01.820
also going to be creating
the infinite scroll for user posts.

00:03:01.850 --> 00:03:04.640
Let's just copy this and paste
it here one more time.

00:03:04.670 --> 00:03:09.480
Instead of user stories,
let's call it user posts everywhere.

00:03:09.510 --> 00:03:12.580
I'm just going to actually copy this part

00:03:12.610 --> 00:03:18.820
and I'm going to make sure that I change
this and I change this here as well.

00:03:18.850 --> 00:03:24.280
I'll change this here as well and here.

00:03:24.920 --> 00:03:29.320
Let's do it here and here.

00:03:29.350 --> 00:03:31.700
Now we have all of the variables set up.

00:03:31.730 --> 00:03:34.160
In the next video, what we're going to be

00:03:34.190 --> 00:03:38.040
doing is actually creating
the user post component.

00:03:38.070 --> 00:03:40.200
Just come back to the video whenever

00:03:40.200 --> 00:03:42.580
you're ready and we're
going to do that together.

00:03:42.600 --> 00:03:45.120
Thank you so much for watching
and see you in the next one.

