I work on the backend side of things currently, but from what I've read React is more powerful/ sought after currently, so that's what I'm going to be dedicating my tie to learning, wonder if this documentary might make me reconsider!
I work on the backend side of things currently, but from what I've read React is more powerful/ sought after currently, so that's what I'm going to be dedicating my tie to learning, wonder if this documentary might make me reconsider!
Remember react is in it's own ecosystem with their own language/acceptable approaches. The framework will allow you to do more than the community so you need to align how you write with what is acceptable. Last year the might mean classes this year hooks. React is more of a religion or a way of life compared to other frameworks.
Because of this there is a moat around react if you are looking to be hired. You need to stay upto date and involve yourself with the community. You can easily dip your toe in react and the coding is simple. The ecosystem is where the complexity lives and this is as important to understand/accept if you plan on moving into it.
Vue is more like jQuery when it came out. It immediately makes sense with what you have been doing and allows you to use as much or as little as you want.
I think react is great for someone who knows nothing (it provides a community / approach) or for someone who knows too much (those who pushed angularjs too far and got burned) but for the masses in the middle it demands you forget much of what you know works to accept this new way of life. It's too much for many. This is where Vue shines, it allows you to build in whatever way you want which allows you to leverage what you already know.
Also I really think you're overselling the differences between React and Vue. I generally think of them as interchangeable.
They are not interchangeable unless you do things the react way. Drop one html tag like < <div class="main"> in react and it breaks.
Being popular has no bearing on cult-ish status. Popular places like Starbucks can be described that way where a special language is required to order a cup of coffee.
Can you explain? That is entirely valid JSX and you should be able to drop it in any React component.
most other jsx-based things like hyperapp accept `class` just fine from what i know
It's just different, not better. Maybe you will prefer one over the other but that is a very subjective thing.
I've been using both for 4-5 years and I much prefer other libraries these days like Inferno, Mithril, Preact, or Svelte.
As a lover of React, and not having used the others you mentioned here...what is it about them you like over React?
Mithril gives you components + vdom + router + http client in 10kB gzipped. Performance is faster than React + Redux. I think it's the most zen and elegant of all options since your state is basically vanilla JS but that's very subjective.
Inferno and Preact are very React-y. Inferno is much much faster than React. Preact is much much smaller than React. With both you can add a compat layer to use React libraries.
Svelte is another beast altogether. Instead of a vdom it compiles your code to super efficient impertive DOM manipulation code which produces extremely small and fast apps. I don't love the ergonomics but the results are super impressive.
See these benchmarks for my claims about size and speed:
https://krausest.github.io/js-framework-benchmark/current.ht...
The primary thing I care about when comparing frameworks is developer productivity. Bundle size is a moderate concern, saving 50-100ms to re-render a giant table doesn't even make the list.
But there are more specific use-cases where it would indeed matter. Hand-held devices, high calculation loads, etc.
Even Dan Abramov's popular talk on React Suspense shows that even the newest versions of React begin the chugg under the influence of an extreme performance situation.
If you want to make an educated bet about where things are going, you might want to learn Svelte, which abandons the virtual DOM approach for a compiler, allowing you to set values with a simple `=` and creating smaller, faster code (Svelte's output doesn't include Svelte, and there's no virtual DOM to keep updated). Svelte's actual coding experience is also pretty similar to Vue - single file components, etc. :)
My work has a react front end, not sure if there's lots of transferrable skills between the two. For one thing I'll have to learn basic web stuff like CSS, HTML and all, and that will transfer, at least.
Svelte was developed by Rich Harris, who works at the NY Times.
Apple is hiring Svelte developers https://twitter.com/mansur_ashraf/status/1204542852581273600....
I personally think it will be OK. :)
Yes, several actually.
They are Chinese though, not American, so you might not know them as well.
If you live in the Vue bubble then of course you will get favorable opinions. I've been using both React and Vue for a couple of years and I don't think "Vue is generally considered more pleasant". Some people prefer one, some people prefer the other.
I'm not in the Vue community. When 'React vs Vue' was happening back in 2015 I was using a completely separate virtual DOM library (Ractive) so I'm relatively unbiased.
I've just been coding, writing, and speaking about JS for a decade and I know many people who've tried both. They might be wrong, but React having a steeper learning curve (JSX is harder to pick up than SFC), a more variable developer experience (depending on state management libraries used) and more complexity than Vue is definitely the common opinion.
Vue was heavily inspired by Ractive though.
(btw I didn't downvote you)
Edit:
> but React having a steeper learning curve (JSX is harder to pick up than SFC)
I don't know.
Templates might be easier for beginners than JSX but OTOH with Vue you need to learn a lot of abstractions (eg: watchers, reactivity is not obvious, etc). I think the complexity of getting started with React is that you need to add more third party libraries plus configuring your dev tools with Webpack/Babel/etc. CRA solves that for you but it's a huge black box if you don't know what you are doing.
I will agree that with Vue you can start directly with script tags a la jQuery and that is great for a lot of projects and beginner devs.
Not being able to use html closes a lot of doors. Have you ever wanted to just copy and paste html into a template script tag and have it render? With react you need to convert that first..
I want to grab a json list and display it in a li tag. With vue I fetch, assign to a variable and in the template v-bind it. With react I would write another component for the li maybe do a foreach.
Watchers existed in jQuery. Not sure they are so difficult one would choose react most people would just avoid them.
Bold statement. To me, more pleasant development is having everything typed.
I couldn't imagine not having my props, styles, and state protected.
The premise of the podcast is quite interesting. If you follow it, do you have any episodes you'd recommend in particular?
1. https://www.indiehackers.com/podcast/137-taylor-otwell-of-la...
2. https://www.indiehackers.com/podcast/131-tyler-tringas-of-ea...
3. https://www.indiehackers.com/podcast/086-lynne-tye-of-key-va...