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?
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.
That's the best resource because it's primary source material. Now `npx create-react-app` and make something. No need to overthink this.
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.
I'm not affiliated with them in any way, they have an interesting video-editor-learning tool.
[0]: https://scrimba.com
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?
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.
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.