|
1 |
| -### Activity - Clone the repository and Install Node |
2 |
| - |
3 |
| -Let's go ahead and get started. |
4 |
| - |
5 |
| -First, clone this repository. |
6 |
| - |
7 |
| -In your terminal, in a folder where you would like to keep this project, clone the repository, and do the following: |
8 |
| - |
9 |
| -``` |
10 |
| -cd intro-react |
11 |
| -git checkout changes |
12 |
| -``` |
13 |
| - |
14 |
| -Next, open the folder in your favorite text editor. We reccommend VSCode. |
15 |
| - |
16 |
| -Great, now if you don't have Node installed on your computer, go ahead and [install it](https://nodejs.org/en/download/)! |
17 |
| - |
18 |
| -Awesome! |
19 |
| - |
20 |
| -### Current Functionality |
21 |
| - |
22 |
| -Now, inside your repository folder, run the following: |
23 |
| - |
24 |
| -``` |
25 |
| -npm install |
26 |
| -npm start |
27 |
| -``` |
28 |
| - |
29 |
| -Your browser should open `http://localhost:3000/` |
30 |
| - |
31 |
| -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. |
32 | 1 |
|
| 2 | +# Set up a React Application Locally |
33 | 3 |
|
34 | 4 | ### So what's in our React App
|
35 |
| -Let's take a look of what our React App looks like right now. |
| 5 | +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](https://facebook.github.io/create-react-app/docs/getting-started). You will not be editing any files in this step, but the structure is important for future code references. |
36 | 6 |
|
37 | 7 | 
|
38 | 8 |
|
39 | 9 |
|
40 |
| -##### package.json |
41 |
| - |
42 |
| - |
43 | 10 |
|
| 11 | +##### package.json |
44 | 12 | 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.
|
45 | 13 |
|
46 | 14 | ##### public
|
47 | 15 |
|
48 |
| -This directory contains our `index.html` which directs us to the rest of the web application that requires additional processing. |
| 16 | +This directory contains our `index.html`. That file directs us to the rest of the web application that requires additional processing. |
49 | 17 |
|
50 | 18 | ##### src
|
51 | 19 |
|
52 |
| -This is where pretty much ALL 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 thos `<div/>` tags. Don't worry, we will get to that stuff in a bit. |
| 20 | +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. |
| 21 | + |
| 22 | +## Step 1: Set up locally |
| 23 | +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. |
| 24 | + |
| 25 | +### :keyboard: Activity: Clone the repository and install Node |
| 26 | + |
| 27 | +1. Open your terminal |
| 28 | +2. Move into a location where you want to keep this project |
| 29 | +3. Clone this repository |
| 30 | +4. Move into the repository: `cd intro-react` |
| 31 | +5. Checkout to the `changes` branch: `git checkout changes` |
| 32 | +6. Open the `intro-react` folder in your favorite text editor |
| 33 | + - We recommend VSCode |
| 34 | +7. Check for Node installation: `node -v` |
| 35 | +8. [Install Node](https://nodejs.org/en/download/) if it is not installed |
| 36 | +9. In your repository folder, install the necessary packages: `npm install` |
| 37 | +10. Start the React Application: `npm start` |
| 38 | + |
| 39 | +Your browser should automatically open `http://localhost:3000/`, and you should see our barebones gradebook application. |
| 40 | + |
| 41 | +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. |
53 | 42 |
|
0 commit comments