1. https://survey.stackoverflow.co/2023/#section-most-popular-t...
With an experienced and top-notch developer, anything is possible in any language or framework. For the other 95% of devs out there—especially on a team where the lead doesn't keep a strong grip on the reins—React turns to mud awfully fast. But it's mud with an extensive ecosystem and tons of inertia helping it succeed.
Consider jQuery. It was extremely popular once; was super influential to the point that some of its apis were adopted by the browser; is completely irrelevant now; but is taking a long time to die. I've been wondering whether React is destined to repeat this trajectory.
The bloat in the ecosystem of (mostly) abandoned packages is unparalleled. With the bloat comes the need to tree-shake, bundle, compiling, things that are not needed in modern web development but takes a good amount of the dev cognitive load when developing a React app.
There are great alternatives nowadays that don't come with the bad recent decisions of React: Solid, Lit, even vue or svelte.
Do I recommend someone learn React to develop a web app nowadays? No, it's not worth it.
I'm not preaching to you, but to the juniors reading the thread. React contributes significantly to current JavaScript fatigue, and supporting it so juniors can get a job isn't in my or their best interest.
I’m discussing career advice. Something junior developers look to senior developers for. If your advice to your juniors results in them having fewer employment opportunities then you’re not doing a good job as a mentor.
> Do I recommend someone learn React to develop a web app nowadays? No, it's not worth it.
In what way is it not worth it? The majority of front end dev is done in React. Of course it’s worth it, even if it’s shitty.
You'd be putting yourself at a disadvantage in the field (employment wise) not learning at least some basics. Especially if you're just trying to get your foot in the door. It's already hard to 'break in' but even harder in this hiring climate.
I feel like from an employability perspective I shot myself in the foot, but I also dislike both of those frameworks. So maybe I should just quit being a front-end developer and try to retrain as something else.
That said, transitioning to some backend or infrastructure focus never hurt anyone. It's good to see problems from different perspectives and roles. No one ever got fired for knowing too much SQL.
If you already have fundamental web dev knowledge, you'll be able to switch between them easily.
That's why I like Remix. It's react + web fundamentals. I'm happy to jump into a Vue, svelte, angular project. It's not all that different
I don't like react much, but I surely hope you advise them on ways to organise state management and rendering with good ways to track event listeners.
Anyone advising juniors against learning React is shooting them in both feet, not least because of the demand for React developers.
Strong foundational knowledge in HTML and CSS helps as well. Still amazes me how many folks put onclick handlers on div tags and freak out when margins collapse.
Smaller, cleaner, and faster code while still focusing on dynamic interfaces? Svelte or SolidJS
Focus on server-side HTML rendering with little to no browser dynamism? PHP (It really is quite nice now.)
Focus on server-side HTML rendering with some browser dynamism? HTMX + server framework (PHP, Django, Go templates, etc.)
Getting a job as quickly and easily as possible, especially at larger companies? React or Angular (You're a cog in the machine, but cogs often get better paychecks to deal with multi-megabyte code blobs.)
Can't decide between code elegance/performance and finding a job, so you're willing to compromise a little on both? Vue
React is hobbled by the need to retain backward compatibility, but it is boosted by sheer scale and a solid underlying philosophy, design, and engineering.
Someday, we will probably find a fundamentally better philosophy for UI frameworks, but I don't know yet what it will be. React replaced its MVC predecessors with a functional approach, the Flux model.
AFAICT, if you pick any of the others options you'll have to refactor your site every 3-4 years as all the tools bit rot. One won't run on the latest version of node so you upgrade node. Now 2 other libraries fail and require an upgrade. Now another library fails because it's not compatible with those upgrades, repeat. You thought you were just going to fix a bug or add a small feature that would take you a few hours but now you've got few days/weeks of refactoring before you can even start.
WebComponents are the future (and the present) of web development.
Now is WebComponents prime time. Libraries like Lit have just a little bit of code that makes the DX of webcomponents be top notch. Some people like to use TS with it but what I love about lit is how powerful it is with just vanilla JS and no compile/bundling/building phase. Development directly in the browser, sane stack traces and faster than anything I've seen.
Lit code is similar to what React was until the 16 version.
If you're messing around and having fun, sure learn some hipster frameworks.
If you want to have highly saught -after skills years from now, basic web Dev with most popular frameworks on top is by far the safest bet.
I agree with you about knowing a bit of most popular frameworks tho, they are quite interchangeable and very often adopt each others famous features. The biggest advantage of choosing Lit as your main tool is that it is the one that is more integrated with web components that won't go anywhere, anytime.
Turns out, it's quite trivial to publish react and angular components as web compenents.
That completely took the value prop away from lit, and in terms of DX and library support, the other frameworks won easily
I'm not saying don't use smaller frameworks. I'm saying the safest future bet is learning the big ones
I always disliked the it’s a library not a framework debate. Isn’t any library a framework, technically?
/s
Also, try calling App and see what happens if it uses hooks.
App() will never be called.
In the past 2 or 3 years, they just "gave" up, turned it into the biggest most bloated framework in the frontend area while the official Web APIs in the browsers evolved so much that React is actually completely useless and now it is completely useless with a compiler.
I'm wondering if that was actually the reason they pivoted to this Frankstein? The loss of relevance as a frontend library.
Anyway, I jumped off the bandwagon and don't have a say in this fight anymore. But I'm doing my part advising every Junior Developer to not make the mistake of choosing React today.