Hello developers! It's has been two months since a graduated from Flatiron School. Since then I had been working on a little project using the React framework.
I would be honest with you guys. After the program was over and I had my last review and final presentation my brain was so exhausted that I didn't touch my computer for two weeks. After that, I found myself super excited and full of new ideas I thought that this blog would be the perfect place to charge my new application journey. Let's learn more about React together!
Ok, let's said this is the first time you're creating a React application. One of the steps that many new developers struggle with is the installation process of React. What if I tell you that's a really easy way to start your React application from the scratch? Enters create-react-app
For create-react-app to work, you are going to need NPM on your system. NPM or Node Package Manager is the world's largest Software Registry and contains over 800,000 code packages. NPM is installed with Node.js which means that you have to install Node.js to get npm on your computer.
Node.js is an open-source server environment. With Node.js you can:
- generate dynamic page content
- create, open, read, write, delete, and close files on the server
- collect form data
- add, delete, modify data in your database
Go to the official Node.js website to download and install Node. Installing Node.js would automatically install NPM on your system. It's not that great?
IMPORTANT STEPS BEFORE AND AFTER DOWNLOADING Node.Js
- Press the "Recommended For Most Users" option.
- After installing Node, start your terminal and run:
-vallows you to see what version is currently installed on your system of any program. The more you know!😉 This step is really important because your version of NPM should be at least 5.2.0.
3.If you have an older version of NPM, run this command to update it:
npm install -g npm
After this, now we're ready to install create-react-app. Create React App is a tool (built by developers at Facebook) that gives you a massive head start when building React apps. It saves you from time-consuming setup and configuration. You simply run one command and Create React App sets up the tools you need to start your React project. This just not saves you time but avoids mistakes in the setup process.
Ok! Now, how do you install create-react-app?
To install your app, first, go to the right directory where your app folder lives and run the following command:
npx create-react-app your-app-name
The installation process it's not short. It would take a couple of minutes. So go, grab a cup of coffee or watch a YouTube video until everything is set up for you. After that, I would suggest going to your folder and double-check that everything is there.
And that's it! Your new React Application is created and ready to rock. In the next blog, I would talk about how to run your application, and the first few steps you always need to follow at the beginning of creating a wonderful React app.
See you soon!