Getting (re)Started with React in Summer 2017

David F. Choy
Jul 21, 2017 · 2 min read

Inspired by the Bell Brothers use of Angular at jen.lu, I’ve concluded that, while I still have some old-school reservations on new screen readers vs. Section 508, it’s OK in some markets to bake more javascript into my next more-of-a-website-than-an-app Wordpress project. It’s been almost two years since I started my first React app, things have changed, and here’s what’s working for me now — these things might be helpful to you:

1. N

N helped me update node.

install -g n
sudo n latest

I found n to be slightly easier to use than nvm. It enabled me to, with less errors, appease create-react-app…

2. Create-react-app

Create-react-app sets up a development environment on your local machine in one step. It just worked. I admit to not knowing how everything worked, but it did. I am simultaneously glad that this didn’t exist, and wish that it did, when I started with React. It also helps you create files to deploy to a production server. Here’s how to install it and create an app:

npm install -g create-react-app 
create-react-app my-app

Here’s how to run the development server, which opens a browser to http://localhost:3000/ and turns the terminal into an error console:

cd my-app
npm start

Once started, the browser automatically refreshes the app when changes to the app code and css are made. When you are ready to deploy, run npm run build which puts package of files in a build folder.

3. Atom

I’m still using atom. It, and many packages, are much more stable than they used to be. Here are some packages I have used in the past and are active on my machine:

4. Deployment

If you are creating a single-page web application, you might be interested in now or surge or github pages. For my more-website-than-app thing I’m making now, I would like one less service to deal with, and therefore need to get my files to the host where Wordpress is, and have not found the perfect tool yet, but continue to use Transmit. I’m going to see how reliable npm run build works with it soon.

What’s next?

For this project, hopefully:

)
David F. Choy

Written by

https://david.choy.me

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade