Introduction to Using React with Rails

Read about how we can use React with Rails in our project.

Introduction

React has emerged as the most popular of the current JavaScript frameworks, with a large ecosystem and user base. Structurally, React is the polar opposite of Stimulus. It is more complex, and its design reflects fundamentally different assumptions about how to manage state and logic in a JavaScript program. Specifically, a React application expects to get data from the server, managing state and HTML by manipulating the DOM on the client using a custom HTML-generation language called JSX.

For this course, we will only use a fraction of React’s capabilities. That is, we’ll focus on using React to support interactivity on a single page while working with our Rails application. We won’t focus on using React for a single-page application. A single-page application is very useful in some circumstances, but it is more complex and less likely to benefit from Rails as the back-end. We’re going to focus on simpler use cases for the purposes of this course.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy