Ask HN: What is the best resource to learn React for a Backend Developer?
I have experience of working in Ruby on Rails for more than 10 years. I have some knowledge of Javascript but I don't know React or Vue or any new JS library.
I see a lot the combination of Ruby on Rails with React so I decided I want to learn React and then maybe Vue.
So I am looking to buy a book or a course that could help me learn React (but not server side nodejs) as fast as possible.
I am looking at something where I can build a project with a medium difficulty. I tried in the past to learn Vue from some Udemy course and a book but I got bored with the pace of the resource. It was building something very simple and focused too much on Nodejs on Backend and React on Frontend.
What would you suggest? What worked for you?
16 comments
[ 2.2 ms ] story [ 58.5 ms ] threadI'm not affiliated with them in any way, they have an interesting video-editor-learning tool.
[0]: https://scrimba.com
It's lighter and a narrower footprint, but builds on JS fundamentals while introducing core concepts of component frameworks.
This allows you to build on these concepts like stores, hooks, actions, etc. which all have equivalents in other frameworks as well.
Transitioning beyond this to other frameworks is by choice but the foundation is more or less the same.
Personally, I found the transition between Vue and Svelte more intuitive, but only real difference I found between React and Vue/Svelte is JSX syntax and getting to grips with a few of its idiosyncracies.
And Svelte's tutorial and learning ecosystem is by far the best I've experienced so far.
Hope this helps.
As a js dev myself I recommend lit (https://lit.dev). Personally I like it way more than react or vue and its easier to swap out later if you want to.
Since you’re a ruby dev, have you checked hotwire out? Or is there a specific reason to why you want to learn react?
Why I want to learn React is looking around at the direction of web development I see less job requirements for Ruby on Rails SSR and more about Ruby on Rails API with React.
I am not looking to change my job now and I like backend development. Sometimes I also do a side project or small contract that is creating a web app just to keep myself a little up to date with frontend stuff.
I think I resisted enough the SPA hype and maybe I am on the wrong side of history :) so I want to give it a try.
I just sat down, set up the initial create-react-app template (using Typescript, because I like Typescript), and started building a project.
That's probably the most helpful and frustrating way. But at least with React, the tutorials and documentation are both really useful, so it's very hard to get stuck.
I did this with Elixir/Phoenix but somehow even if they are a different programming language some things were common with Ruby on Rails. With SPA I feel (as I don't know for sure) that it is too different than SSR.
create-react-app is a great way to start imo from nothing. Also learn the arrow function way to write code and go for hooks but sometimes nice to know the class-based way.
It depends a little on your knowledge of CS fundamentals. If you've got a fairly good grasp, you might benefit from learning the internals of react alongside the high level functions.
I say this because idiomatic React is quite different from traditional programming. React is declaratively programming your UI, by arranging components in a tree-like structure with unidirectional data flow. Engineers with experience in more traditional OO/procedural programming (like me, when I started learning React) can often get caught in a familiarity trap. After a while, you end up doing all sorts of taboo things like passing refs down the tree or using Observables; when there are simpler idioms.
I'm not sure of any learning materials, I learn just by following normal beginner courses and being hyper inquisitive. It's probably not the fastest way but I find it fairly natural.
https://www.robinwieruch.de/
That's the best resource because it's primary source material. Now `npx create-react-app` and make something. No need to overthink this.