I'm with you in sentiment;
However, I see React (and the idea of a "framework") as a team/org collaboration tool rather than a personal tool. It's very opinionated about (many) certain things, which means the team doesn't need to choose or argue about them.
This type of value is so important for managing a team and for time-to-market (often confused with "DX"), that it's often worth it despite its weaknesses.
As an individual dev its value diminishes, and the value of making particular choices in the right places grows. That's totally OK.
this is...my exact thoughts. I started learning web dev in January 2017
Somehow the React train never stuck with me. I tried Gatsby, CRA et al, but it never stuck. I spent my first 2years of learning with Ruby, Rails, and vanilla JS / Stimulus, and it was all transferrable and useful. React, not so
I didn't say zero dependencies, I said "try to use as few dependencies as possible". And no, jQuery is far less complicated given how closely it aligns with existing platform primitives. Learning $() and $.ajax() will be directly transferrable to querySelectorAll() & fetch().
Good point actually. I had the same thought, but this is a great answer to it. You can't go wrong by learning the basics. Having a great understanding of the platform and JS as a language is the key part to becoming a good React (or any other framework) dev.
You are right. Regarding the part about react being functional, hooks are AFAIK supposed to somewhat-emulate algebraic effects. Real algebraic effects are much nicer and open up some powerful programming patterns; furthermore the important part is missing (setup your own handlers e.g. for testing).
EffectTS is a step in the right direction there but AFAIK the handlers are not decoupled from the effects. I think it might be interesting to explore customizable effect handlers (can probably be implemented with generators) and whether that might help with writing UI components.
I love react and functional stuff. But this is the exact reason I push people learning today to web components. The fundamentals and the platform are transferrable, abstractions not so much.
One thing missing from this perspective is that the overwhelming majority of people just starting to learn to program are looking to have a job in it as soon as possible. They aren’t trying to learn the web for the love of it. I tailor my advice to people just starting to learn around this
Which is why I so heavily recommend prebuilt UI libraries like react-aria or material ui. Ignore 95% of what’s going on and let someone else who is already an expert make it work correctly. Survive capitalism first, then go in whatever direction you want
I’m not saying learning React is the only good advice, but learning the bare bones of any framework with a lot of entry level jobs and a lot of off-the-shelf resources is generally the right place to start
So yeah, get that bag. But also in a competative market you're likely looking for a differentiator and "knowing react" vs "knowing react really well" isn't good currency. The perhaps too subtle implication of the advice was "learn enough react to evade detection then learn more meaningful things"
You really don’t need to know much of React (or Wordpress or Django or any popular framework) to get an entry level job. One of the amazing things about web development is its ability to lift people up in some of the most desperate situations
You say “get your bag” but you also recommend reading the HTTP 1.1 spec. I don’t want to drag you, but that is advice that makes people quit web development before they even get started
As someone who's used React since it first appeared and who is still enamored with it, I don't disagree with this as timely advice. I do think it's on the way out and the concepts it is currently exploring may be dead ends.
I find expert-level React is delightful. But getting there, now? Maybe not.
I do think 'transferability' is not the only metric to optimize for learning. React is unique, even still, among approaches. Really understanding a unique approach is a good way to learn to think more creatively about novel problems down the road.
Are hooks a good tool? Maybe not. They do have lots of unintuitive problems attached. But understanding how they work has opened my brain to new possibilities of how behavior can be expressed. That openness is 'transferable.'
I mean, I personally like React and will keep using it, but I started out with vanilla JS and I definitely don't regret that choice! Definitely agree that understanding things at least below the framework level is super important
React code from 2014 can still work today with minor adaptations.
Sure hooks/RSCs/Suspense are "new", but React is not the only one adopting those. Do you think it's more portable to learn Livewire, LiveView, Turbolinks?
Maybe it's not exactly the same, but is this fundamentally different and less portable if you learn Vue composables? Can you reuse that knowledge outside of Vue more than you can reuse React hooks outside of React?
Well for one Vues reactivity system works outside of Vue, so I'd say it is more portable.
The big difference with Vue and (P)react is that Vue uses a setup function that runs once (I believe solid might be the same). React is a render function which is where lots of the complexity seems to be.
So Vue composables are just functions that get called like any other. Hooks have a lot more rules to them. For me hooks have a very different mental model that's never made as much sense.
I think of hooks as a new "colour" of function, like sync and async. You can call sync from async, but not vice versa. You can call non-hooks from hooks, but not vice versa
The concepts matter, the APIs don't.
You have learned 2 distinct models and their tradeoffs and are now able to make decisions based on them in the future. That was worth it to learn.
In 20 years, knowing the exact APIs of React 19 or Vue 3 won't matter
In a silo perhaps; but if I introduced a code change using React classes to a codebase today, it would not make it to merge without some extremely good justification. So the reality is hooks are how you write React today.
I think I'd be less inspired to write the post had React stuck with classes. Classes were fine, not too innocuous. I think the hooks paradigm has had a leeching effect, creating a dogma where one didn't exist before. I think it has instilled a large set of troubling practices that didn't exist prior
The general dogmas such as "UI is a function of state", or that there is one concept of "state". The practices around controlled components, around retaining state that the browser already handles. SPAs. Client side rendering. The general disregard for the HTTP layer.
Maybe the APIs of React are not portable knowledge, but the concepts behind it kind of are?
How many devs learned declarative model, immutability, state management, thanks to React, and have now the ability to apply that to other things they learn?
Similarly, is learning JQuery useless? I don't think so: the JQuery you learned back in the days made you more productive today
Might also surprise you but nowadays React devs learn the web platform while using React. We acknowledge that progressive enhancement is important for example.
once you know the fundamentals of web, you can learn most of React in an afternoon. there isn't much to it. same goes for pretty much every framework (Solid, Lit, etc).
personally i don't care for React, but i'm not trying to make my own life harder if i need to use it for $work.
I agree for the most part. But herein lies the problem. We both know the fundamentals. I see many early career folk who _start_ with react and struggle with the fundamentals after the fact.
why is that a problem though? fundamentals are hard! it was way easier for me to learn vanilla javascript after “soft landing” with jQuery (well, actually https://script.aculo.us). if i’d tried to start by cracking open JavaScript: The Good Parts i probably would have given up.
I think some tools set you up better to learn the fundamentals. I'd probably include jQuery in that, given how close it is to "vanilla" JS. I agree with what you're saying overall though.
yeah jQuery definitely feels more like “DOM with superpowers” than a whole different abstraction on top of it. though i think it’s only so close *now* because it was such a successful test bed for APIs to standardize. when i started using it querySelectorAll wouldn’t be available for half a decade!
ultimately tho i think “fundamentals” are a moving target and mostly a product of someone’s ambition as opposed to any sort of ground truth. this article by @seldo.com strongly resonates with me (even as i myself care about things broadly considered “fundamentals” today) https://seldo.com/posts/theres-no-such-thing-as-the-fundamentals
You're not alone. I'd call myself something of an expert in web fundamentals and they confuse the crap out of me. They also frustrate me because this is self inflicted. It doesn't have to be like this.
As far as FE JS frameworks go, I always thought Vue 2 was the best designed one by leagues. There is no equivalent of a broken useEffect in Vue. Or a having to build a Context (Vue does the work for you).
Comments
However, I see React (and the idea of a "framework") as a team/org collaboration tool rather than a personal tool. It's very opinionated about (many) certain things, which means the team doesn't need to choose or argue about them.
As an individual dev its value diminishes, and the value of making particular choices in the right places grows. That's totally OK.
Somehow the React train never stuck with me. I tried Gatsby, CRA et al, but it never stuck. I spent my first 2years of learning with Ruby, Rails, and vanilla JS / Stimulus, and it was all transferrable and useful. React, not so
It felt counter to what I should have been doing but also the way to get to developer from React developer.
So jQuery is not a dependency nor complicated?
I find expert-level React is delightful. But getting there, now? Maybe not.
I learned backend, FP, how the web works, HTTP etc before learning React
Working with React taught me more about the web platform than any of the previous work.
Particularly these last years, with focus on progressive enhancement
React code from 2014 can still work today with minor adaptations.
Sure hooks/RSCs/Suspense are "new", but React is not the only one adopting those. Do you think it's more portable to learn Livewire, LiveView, Turbolinks?
Svelte runes
Solid createEffect/createMemo
Maybe it's not exactly the same, but is this fundamentally different and less portable if you learn Vue composables? Can you reuse that knowledge outside of Vue more than you can reuse React hooks outside of React?
The big difference with Vue and (P)react is that Vue uses a setup function that runs once (I believe solid might be the same). React is a render function which is where lots of the complexity seems to be.
You have learned 2 distinct models and their tradeoffs and are now able to make decisions based on them in the future. That was worth it to learn.
In 20 years, knowing the exact APIs of React 19 or Vue 3 won't matter
Although from my experience it's for the better in terms of maintenance and composition ability, despite the rules to respect
If React had stuck with classes, does it change anything to your post anyway? Classes were not portable either.
It has always had a pragmatic approach full of escape hatches, and only took inspiration from FP concepts like a declarative model and immutability.
Using monads has never been goal. Sure it's good to learn these concepts but would you write webapps in Haskell?
How many devs learned declarative model, immutability, state management, thanks to React, and have now the ability to apply that to other things they learn?
Might also surprise you but nowadays React devs learn the web platform while using React. We acknowledge that progressive enhancement is important for example.
---
The "true" in the share snippet, is it a code bug, or is it an affirmation about the post itself 😜
Only a few things has changed and mostly on the syntax level. Conceptually most of the stuff remained the same.
once you know the fundamentals of web, you can learn most of React in an afternoon. there isn't much to it. same goes for pretty much every framework (Solid, Lit, etc).
personally i don't care for React, but i'm not trying to make my own life harder if i need to use it for $work.
Sure they are free of any footguns (unlike React) and usually lead to the same UX in the end 🤷
It would be interesting to look at Solid/Svelte/Qwik and see why they feel like and result in.
most of the web sucks because of a lack of care, rather than some technological choice.
I wanted to just see a more apples to apples comparison against other client-side frameworks.
Similarity with web components. Something like Lit.
As far as FE JS frameworks go, I always thought Vue 2 was the best designed one by leagues. There is no equivalent of a broken useEffect in Vue. Or a having to build a Context (Vue does the work for you).