IMHO, back-end is a better long-term career investment, as it changes slower, less faddish, and you learn skills applicable to many situations. Its not easier, if anything actually harder, but more satisfying in my experience. I've noticed many early-to mid 20s devs love front-end, the new and shiny, it feels creative and "cool" to them. However, they can crash at age 30+ when those front-end skills aren't cool anymore, if that's all they have. Whereas, had they learned lots of back-end and dev-ops-y stuff, bash scripting , linux etc, those are longer value skills. I write this as basically a full-stack dev, although much stronger on backend and devops than the latest JS libraries. As someone well the wrong side of 40, this particular skills choice has served me well in terms of still being marketable despite being older. So my advice = invest in back-end skills whatever you do
Possibly you answered your own Q there? ;). Using scripts, Linux plentifully in a front-end job, might indicate being a bit more full-stack than you call yourselves, and hence, you've got some long-life skills alongside the Angular/React/whatever. I'm not saying everyone ages out of it, just I'd seen it as a thing for some people. I speak as someone now a bit old for tech (late 40s) , yet somehow managing to have a marketable skillset, some of which is ancient yet always applicable. Maybe being a purely front-end dev is safe as long as you become a vim expert in the process. ;). (not entirely joking here actually!)
Any chance you could list the skills/knowledge you feel have kept you marketable?
Asking as I'm just about to reach mid forties and I'm a Frontender who feels the same as the OP.
If I have a go at moving to backend one concern I have is that I wouldn't know what skills are just nice to have's and what's an essential skill so I could waste too much time learning the wrong things.
Sure. Glad to help :). Bash/zsh/scripting in general, combined with nice productivity tools like fzf, vim (really speeds up your work when you know it well and you can get vim plugins for VSCode/PHPStorm/InteliiJ etc). However, don't sweat not knowing vim if you at least have one very good editor available everywhere that you know well. Docker, (which often just amounts to knowing what shell script to put in a dockerfile), fair amount of exposure to AWS, short-cutted by using the command line cli combined with jq. (AWS is a beast, so don't try to keep on top of it all, but master the basics like e:g how to list S3 bucket from command line), some exposure to Terraform, wouldn't say I really know it, but I could edit some tf files and add stuff then go in the AWS console and look what it created (but I'm really a dev, not an infrastructure eng, so this works out to be enough). Python (lots and lots of it). Python is super useful for knocking out stuff quickly. Python will always be useful IMHO, for decades I believe. PHP I don't know fantastically but I can scrape by. Java ditto although I really don't like Java. C++ I did years ago , for years, don't really do it now much but occasionally comes up. Makefiles = a truly ancient but v useful skill. Soft skills like being pedantic about nailing down requirements precisely. Being nice to other team members and easy to work with (but I'll let them be the judge of that ;) ). One key thing I think is I always adored the command line, and shunned GUIs , not a massive fan of IDEs. Guess which one of those stays current and guess which one gets completely changed around and/or falls out of fashion. ; git- make sure you know that reasonably well especially the command line (sure its a PITA to get to grips with, but worth it). In general, mess about with Linux a little bit in your spare time (within reason, not letting it get in the way of family time.). See if your partner will switch to Linux even if not a geek. My wife has, and MS Windows drives her nuts compared to it. ;). Even our daughter messed about with some terminal commands like cowsay etc. ;). why is that even relevant here, well it keeps you in that groove of discovery and enjoyment. IMHO anyway. ;). running C sharp/dot-net core on Linux is something I enjoyed , nice language on a nice platform..
> If the tools you learned in your twenties age out of relevance
If someone learned React in your 20s and then "aged out", they must have been an early adopter. React is only 9 years old and most developers didn't start learning it in 2013. And it's far from irrelevant: https://trends.builtwith.com/javascript/React
> "Modern" web frontend work involves a lot of chasing after new tooling, frameworks, and libraries.
Yes, if you learned React you'd have a decent shelf life still.
What if you learned classic AngularJS, due to go unsupported in a month and a half? What if you threw in with ExtJS ages ago and the enterprise corp you've been using it for just downsized and outsourced your project? Maybe you were an EmberJS aficionado but can't find new gigs using it. I worked on a greenfield project in Backbone/Thorax/Mustache a number of years back but haven't seen any of those in the wild since. Maybe you love Elm but can't find any places that will hire you to use it. Ditto using Clojure on the frontend.
Picking the winner is a great trick, but my point was that if you didn't (or just the companies you worked for didn't), you may find yourself in a bit of a hole, specifically if you have a lot of other responsibilities in your life.
Skills transfer across frameworks and even languages. If you're good at Elm or Clojure, you would be great at React. Vue owes a lot of its structure to the original Angular (or at least it did when I learned it forever ago).
Sure, skills do apply across frameworks and languages. The hundred stupid things you need to know about any given framework don't, though.
To be clear, I'm not thinking about people who've used lots of languages and tools here. I've done time working for huge corporations for whom software is a cost center, and it's easy to find people in those contexts who are competent with the tools they know but have narrow enough experience that moving to something else is difficult for them.
The "average Joe" programmer's experience is what I'm thinking of here.
Aside from what NateEag said, React is one thing, but the tooling is a completely different topic. When it comes to building your frontend, there was grunt and gulp (that I'm aware of), now the tools that get most love are I think webpack and esbuild. I didn't do anything with esbuild yet, but the way that applications are built changed a lot during the years, and webpack is much different that whatever there was before.
Also, all of those tools are massive pains in your ass if something breaks, because debugging what actually broke is hard when your build process becomes more complicated.