A Hello World React App

We will run a basic Hello React App in this lesson.

hello_react.jsx

Our purpose here is to ensure we can configure our Rails app by using Docker to allow us to develop modern JavaScript apps using technologies like React. To that end, we just need to show that a simple React app is compiled and loads correctly with our setup. When we install Webpacker, it adds a sample “Hello World” React app in app/javascript/packs/hello_react.jsx that renders a <div> saying “Hello React!”:

Get hands-on with 1400+ tech skills courses.