Initializing a New App with a Rails API backend and React Frontend

Keeping it simple to start.

Building Out the Backend

  1. In terminal, make a new folder for your app mkdir photo-app and cd photo-app in to it.
Seed file with fake data

Building Out the Front End

  1. In another terminal, cd back in to the main directory. Make a new React app with create-react-app frontend. Cd in to it and run npm start. An error will come up saying localhost:3000 is already in use, enter ‘y’ to run on localhost:3001
  2. In a third terminal, cd in to frontend and add to GitHub.
  3. To use react state, turn App in to a class component.





Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Developing a custom useTimer hook in React

Concurrent API Fetching

JSON Object Example

Create a React Web Application Using Webpack 5 Full Walkthrough

Working with Tailwind CSS in Gatsby

Day 37 | 100 Days Full-Stack Challenge

“They’re starting to collaborate without me” — Corber’s Alex Blom

Hack This Site: Realistic Web Mission — Level 3

My first JavaScript Project — Anime Quote Generator

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


More from Medium

Create a Quora Clone using MERN stack

Creating an APi with Ruby

React app build

What is React?