DEV Community

Steve Polito
Steve Polito

Posted on • Edited on • Originally published at stevepolito.design

I created a step-by-step tutorial demonstrating how to integrate React with Rails

I really wanted to learn React and API development, so I went head first into building a simple application, and documented my experience. I think what sets this apart from other Rails and React tutorials is that I cover...

  • API authorization
  • API versioning
  • Setting HTTP status codes
  • Form validation on the front-end
  • Handling errors
  • Debouncing requests
  • CSRF Countermeasures

Follow me on Twitter

Top comments (3)

Collapse
 
leastbad profile image
leastbad

Curious about your feelings regarding StimulusReflex!

Collapse
 
stevepolitodesign profile image
Steve Polito

I'm very excited about StimulusReflex, and just plain Stimulus. This step-by-step tutorial made me realize how much time and energy could have been saved if I had just uses Stimulus haha.

That being said, this was a really good exercise for me to understand the in and outs of not only React, but also REST APIs.

Collapse
 
leastbad profile image
leastbad

Totally agree! I went through Mosh Hamedani's React course in Spring 2019, and I was intrigued but not excited because it seemed like a huge amount of extra work to accomplish things that are simple with Rails view templates. I know that there are times and reasons to use React and other SPAs, but I hope very much that Stimulus, StimulusReflex and CableReady reach a lot of devs who'd been sucked into believing that SPA-by-default is the only future.