Let's take a look of what our React App looks like right now. We will go through our file structure which is a standard React setup. You will not be editing any files in this step, but the structure is important for future code references.
package.json
This file is our roadmap of the app. It tells us the name of the app, the version, the different dependencies we need to run our app, and more.
public
This directory contains our index.html. That file directs us to the rest of the web application that requires additional processing.
src
This is where most of your code will go. You'll notice we have App.jsx along with other jsx files, but what is jsx. Think of jsx as a mix between html and javascript. We can write tags as well as functions and classes. Take a look at App.jsx. Some of that stuff might look familiar from html, like those <div/> tags. Don't worry, we will get to that stuff in a bit.
Step 1: Set up locally
In this repository, we have two branches - master and changes. We will be working off of the changes branch. Let's go ahead and get started.
:keyboard: Activity: Clone the repository and install Node
Open your terminal
Move into a location where you want to keep this project
Clone this repository
Move into the repository: cd intro-react
Checkout to the changes branch: git checkout changes
Open the intro-react folder in your favorite text editor
Set up a React Application Locally
So what's in our React App
Let's take a look of what our React App looks like right now. We will go through our file structure which is a standard React setup. You will not be editing any files in this step, but the structure is important for future code references.
package.json
This file is our roadmap of the app. It tells us the name of the app, the version, the different dependencies we need to run our app, and more.
public
This directory contains our
index.html
. That file directs us to the rest of the web application that requires additional processing.src
This is where most of your code will go. You'll notice we have
App.jsx
along with otherjsx
files, but what isjsx
. Think ofjsx
as a mix betweenhtml
andjavascript
. We can write tags as well as functions and classes. Take a look atApp.jsx
. Some of that stuff might look familiar fromhtml
, like those<div/>
tags. Don't worry, we will get to that stuff in a bit.Step 1: Set up locally
In this repository, we have two branches -
master
andchanges
. We will be working off of thechanges
branch. Let's go ahead and get started.:keyboard: Activity: Clone the repository and install Node
cd intro-react
changes
branch:git checkout changes
intro-react
folder in your favorite text editornode -v
npm install
npm start
Your browser should automatically open
http://localhost:3000/
, and you should see our barebones gradebook application.You'll see that our app can't really do anything! All we have is three buttons! We are going to add all the functionality.