In the last section we installed no yes on our local machine we're now going to install a tool called
create re-act up that's going to be used to generate a new project.
So let's start that up right away.
I'm going to change on over to my terminal and I'm going to run the command NPM install as she creates
dash re-act dash app like so.
Well go ahead and run it now on my machine it's going to install very quickly on yours.
It might take a couple of seconds if you're installing this for the first time on it.
Take a quick little pause here to tell you a little bit about this command that we just executed because
we're going to run commands like that very frequently throughout this course.
All right.
Here we go.
To the first word on there was NPM technically or I should say officially NPM doesn't actually stand
for anything but you can imagine that it stands for Noad package manager.
When I say officially it's because the project itself says that NPM doesn't stand for anything.
But again it stands for node package manager the node package manager can be used to install tons of
different open source javascript packages on to your local computer to power projects that you are putting
together.
In this case we reached out to NPM to download a package called create re-act up and install it on our
local computer the NPM command or the NPM program has many different sub commands associated with it.
In this case we wanted to install a package so we reference the install subcommand after that.
We then put in the dash g flag.
This flag indicates that we want to install this package globally on our computer.
We will very frequently use the dashi flag anytime that we are installing a command line tool or essentially
some program that we want to build to run from our terminal.
We are going to also see what happens when we install things without the dashi flag later on.
But right now we're just going to use just g.
And then finally we list out the name of the package that we wanted to install.
The name was create up.
This is a very popular package that is used to generate new Riak projects so now that we've installed
this thing we can use it to generate a new project.
I'm going to make sure that I am inside of a workspace directory of sorts and then I'll run the command
to create re-act app and then the name of the project that it wants to generate.
In our case we are going to learn more about exactly how GSX works.
So I'm going to call my project simply GSX and I'll hit enter and that's going to start to generate
my project.
Now before we move on a real quick note I want to mention.
So you're going to find in this course there are many different ways to do just about everything.
We've already seen that we could write a tiny re-act up over on code pen and clearly we can also write
a re-act up on our local machine as well as much as I possibly can throughout this course.
I'm going to highlight some of the different ways that some people choose to go through different steps
and doing that NPM install of create re-act up and then using it to generate a project.
It's already one location where some people do things a little bit differently.
If you go and read the Create react up official documentation they're going to show you a slightly different
process for generating a project than what I just showed you.
So in the official documentation you're going to see that they say that you need to run X create react
up and then the name of the project.
And you can run this command without having to first go through the NPM install.
So essentially if you take this route right here you run one command instead of two.
Now the only reason I didn't show you this alternate fashion even though it's slightly technically easier
is that X is a command line tool that only started to be installed with versions of NPM from version
five point two and higher.
And it is entirely possible and even incredibly likely that you have a version of NPM earlier than 5.2
on your computer.
So I could show you this way but it's very likely that you would have just very quickly ran into an
error.
Now if you want to you can always update your version of NPM and node and then you can generate a project
this way to see you know at the end of the day.
There's absolutely no effective difference between the method I just showed to you and using an.
It's essentially just the difference between running a one command or two.
All right.
So if I flip back or at my terminal it looks like my project has finished installing.
Now you'll notice a bunch of text here.
If I scroll up a little bit you might see something like this right here.
Something that says added seventeen hundred and eighty two packages.
So in order to generate this project and write a time you react application.
We had to install 7500 separate packages onto our local computer.
Now that might immediately seem a little bit shocking if you think about it.
Back on Copen a second ago we created a tiny re-act application after only adding in exactly to library
files.
Remember research for react and react on.
And we added them into our Koeppen.
So why were we able to get away with only two files over there.
But on our local machine we have to install 17:00 Sepher packages.
Well let's take a quick pause right here.
When we come back the next section I'm going to tell you why we had to install so many packages and
we'll help you also understand why we're using this create backed up tool at all.
So a quick pause and I'll see you in just a minute.