S.O.S TO CONGRESS

When my daughter Courtney was a senior in high school her good friend Kenza was hit by car while crossing the street. At 17 Kenza became a quadriplegic. All five of my kids went to public school in…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to set up a react app and add it to github

This is the beginner's part in a medium series of creating a ToDo web application using react and typescript.

Don’t worry if you are completely new to coding, just follow along and google things that don’t make sense, that’s how we all do it really. For the eager new starters, there are a plethora of web development courses out there, check out my 2022 Front End Dev Tutorials 0–100 real quick post if you prefer a more in-depth start to your coding journey.

Step 1: Setting up your local environment

Create a directory called Projects and go into it
Happy hacking! Successfully created a react app

Step 2: The create-react-app folder structure explained
Let’s do what we are suggested. Type cd todo-app in the terminal then ls to see what exactly what our app looks like currently.

CRA folder structure

Step 3: Using an IDE to build our application

What is an IDE? It stands for Integrated Development Environment. Basically combines most tools a developer would need to create an app in one place. I am a VS Code fan, but there’s a lot of IDEs out there. Let’s install VS Code:

3. Checkout the files and get a feel of the environment

Step 4: Running our new app

We use IDEs as it’s pretty easy to do everything we want within them. Let’s open up a terminal inside the IDE window: select New Terminal from the coressponding tab. Then type in the command npm start

Navigate to localhost:3000 and you should see the react logo spinning.

Step 5: Let’s dive deeper into the code

src/index.tsx - the entry point to our app, so whatever component is rendered there is what gets displayed on our page. In this case, that is the src/App.tsx component.

Open src/App.tsx in the editor and let’s change line 10 to any text you want, then save the change and go to the browser again. You should see the text updated:

Github is a version control system keeping track of our changes and lets us collaborate and share our code with others.

Let’s create a GitHub profile and a new repository called todo-app:

Congrats on making it this far! Please do let me know what you think of this tutorial, if anything can be made clearer I would love to update it!

Now we have a great environment to start coding and we also know how we can keep track of changes by using Github.

Now on to the next part of the series!

Add a comment

Related posts:

What is the Antidote to the Poison of Why

That has turned in to my mantra in almost every session with my individual psychotherapy clients. Every single person who sits in my chair eventually comes to a point in our sessions when they say…

How to Start a Cybersecurity Strategy to Protect Your Startup

When an idea grows and becomes a business, for a founder this is often one of the most exciting and stressful times of their journey. It’s important to start defining the culture of your business at…

Stock Keeping Units in the Tech Room

Stock Keeping Units identify what a product should be priced relative to the market. It’s about time someone laid out what your options are for these SKU’s in the tech room. Check out this video from…