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
Top comments (3)
Curious about your feelings regarding StimulusReflex!
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.
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.