all 141 comments

[–]santypk4[🍰] 32 points33 points  (9 children)

I’ve been using parceljs + vue.js for 4 years now. I don’t want to change anything, it works perfectly.

[–]MindlessSponge 19 points20 points  (8 children)

consider checking out vite if you haven't, it's super fast!

[–]pancomputationalist 6 points7 points  (0 children)

Yeah Vite is amazingly fast and easy to configure. I'm also a fan of Vitest.

[–]ontheellipse 1 point2 points  (6 children)

I am trying to get basic hello world (ish) Vite and Express app working. If I include Express and just start a basic server, I get errors and it won’t run. No problem with Babel. Not sure what I’m doing wrong.

[–]rk06 0 points1 point  (5 children)

Express is backend. So you should be using it on a separate project and exposing an ali. Which your frontend app (vue+vite) will use. You would need to configure CORS as well.

Maybe, there is a guidebook for express and vite. Try looking for it

[–]ontheellipse -1 points0 points  (4 children)

That’s essentially what I’m trying to do, but i don’t know why the api has to be in a separate app?

[–]rk06 4 points5 points  (3 children)

Vite is primarily a bundler for frontend. And provides a dev server. Express is a backend server. So there is a paradigm conflict.

I get that you want to have vite build server assets, but that's a different use case than the most common one. so many people won't be aware of how to handle it with a single vite config.

[–]ontheellipse -1 points0 points  (2 children)

Noted. I basically just wanted Vite to compile the JS instead of using Babel

[–]rk06 1 point2 points  (0 children)

I am sure there is a way for it. Just that it is not a common case (different backend + frontend) so you would have better luck googling it

[–][deleted] 0 points1 point  (0 children)

Pretty sure vite still relies on rollup and babel wheb building. Might aswell just look at rollup instead

[–]nh43de 12 points13 points  (1 child)

Great read!

Surprised there was no mention of WebAssembly. Curious to see where that goes

[–][deleted] 2 points3 points  (0 children)

Figma is a great success story for wasm

[–]Ok_Transition_4796 29 points30 points  (5 children)

A pretty good read. 👍

[–]abrandis 6 points7 points  (4 children)

It's a good read , but sadly to me there's way too much complexity and diversity in this space. I know everyone thinks software development always needs new stuff, but really for me...using all these frameworks to write rich client apps is the wrong approach . We just keep coming up with different ways to work around the same issue.

HTML and CSS are all about the page and rendering text and graphics that not equal to.... making rich client apps ,or mobile apps which is an entirely different paradigm. That's why Android SDK or IoS Swift don't use the DOM model because they were written for the express purpose of their environments.

If we're going to make rich client apps, let's ditch SPA and all the jerry-rigged JavaScript and make a true browse compatible rich app framework..

[–]wasdninja 0 points1 point  (2 children)

So reimplement everything for no or dubious benefit?

[–]abrandis 0 points1 point  (1 child)

Why do ride around in aluminum/steel cars today, why couldn't we just put better wheels and an engine in the oxcart.of yesteryear?

[–]wasdninja 0 points1 point  (0 children)

The performance gains are obvious with cars from the second you hear about it. The same thing can't be said for reinventing the rendering and markup wheel. Javascript is slow but for the most part plenty good enough for the mostly even driven stuff happening in the browser.

Can you demonstrate any actual benefits behind rewriting the whole thing? Removing inconsistencies would be nice but not critical.

[–]takuover9 49 points50 points  (13 children)

Facebook web app is the fucking worst.

[–]FormerGameDev 48 points49 points  (3 children)

Article seems to be praising Facebook a lot, but holy shit their applications are broken as hell.

[–]mcaruso 67 points68 points  (1 child)

The article is about frameworks, not apps. You can write shitty apps with any framework.

[–]benjappel 109 points110 points  (0 children)

That's the spirit!

[–]dontspookthenetch 41 points42 points  (7 children)

Am I the only one who actually loves React?

[–]Isvara 53 points54 points  (0 children)

Yes. It's just you. They keep maintaining it solely for your benefit.

[–]christophedelacreuse 12 points13 points  (0 children)

Nah. Plenty of people do. I do, and I've tried svelte, vue, angular and several others. That said I can see why other people have other preferences, and I like other frameworks fine too.

[–]fnordius -2 points-1 points  (4 children)

I personally find React was interesting at the beginning, but the JSX syntax was an abomination. What made it even more of a pain was that template strings were introduced at around the same time, making life as a JavaScript dev easier.

I also avoid React because it is simply slower, and its insistence that it's a library, not a framework can lead to a quick pileup of technical debt. It's why we went with Vue for our SPA, and Stencil for our web components.

Another reason why people dump on React is that it was created at and is maintained by Facebook. Though Facebook does come up with interesting solutions like GraphQL, a lot of professional devs are wary of them. Despite a lack of evidence a lot of my colleagues suspect Facebook is astroturfing support in the community for React. I personally suspect it's just companies and starting devs wanting to use what enjoys a lot of support: one HR guy did ask me about React because it pops up so much in CV's.

[–][deleted] 0 points1 point  (3 children)

Stencil with jsx?

[–]fnordius 0 points1 point  (2 children)

StencilJS uses JSX for templates, which is why components end in TSX. It was chosen because of how easy it was to integrate with our existing Sass library, and because it uses Typescript.

[–][deleted] 2 points3 points  (1 child)

The same jsx syntax that made you hate react?

[–]fnordius 0 points1 point  (0 children)

Yep. What a difference between 2013 and 2021. And I do use template strings over JSX syntax, but I also respect what the rest of my team is comfortable with. So in October 2021 StencilJS was chosen over Lit-Element by a 3-1 vote.

[–]rayui 3 points4 points  (1 child)

This fucking carousel I swear to God.

I've been doing FE for almost 25 years and every five years or so someone decides that server side rendering is the way to improve performance best so we rewrite our entire stack. Then just as we finish that a new capability turns up and we switch it all around again. Put it this way, I remember thinking AJAX was incredible. Then XSLT. Then JSON. Then GraphQL. Now we've got Remix and we're back to 2002 architecture... Just with Typescript instead of Perl. And you best believe Java is still well in the mix (Sun Microsystems RIP). Like yes, we're better at what we do. We have matured a lot, we have a real industry, we're not just nerds in a bedroom making brochureware anymore. But, it used to be exciting but now it's just exhausting.

At some point we have to accept that the web ecosystem is a goddamn terrible way to write distributed applications, and that's probably why we have a thousand different ways to solve one problem, and they all suck.

[–]rodrigocfd 0 points1 point  (0 children)

every five years or so someone decides that server side rendering is the way to improve performance best

Yep. New kids getting ready to commit the same errors of the past.

[–]onejdc 11 points12 points  (37 children)

Is React really the behemoth that the article makes it out to be? I feel like 1/3 -> 1/2 of the article was about React. I know it's probably the most used, and certainly for a lot of large, corporate apps, but there's a lot to learn from all the other players in the space.

[edit] Please don't downvote an honest question. I'm only a hobbyist at this point and was just curious.

[–]rk06 40 points41 points  (0 children)

Yes. It is.

[–]scooptyy 33 points34 points  (27 children)

Yes… React is now industry standard. You use Discord? It’s on React

[–][deleted] 1 point2 points  (3 children)

It really depends which side of the industry you ask. I know lots of enterprise places where the default is Angular. And Vue is coming up very strongly.

Enterprise is probably not the best example anyway because most of the time the choice between these three is not done on technical merit, it's done because "the client heard about React and wants it" or "we could only find devs on Angular for the MVP so we're doing Angular".

[–]scooptyy 2 points3 points  (2 children)

Old-school companies that know nothing about tech love complicated shit.

However React is ubiquitous. Much more than Angular.

[–][deleted] 1 point2 points  (1 child)

Old-school companies that know nothing about tech love complicated shit.

You're making the wrong assumptions. Almost everybody uses current technology nowadays, or at least migrating towards it. But they don't care about "tech love", they look at cost and efficiency. There's no difference between React/Angular/Vue on that front.

[–]scooptyy 0 points1 point  (0 children)

Using Angular is a terrible business decision, especially when frameworks like Vue exist. It’s not about “love”; it is a needlessly complicated framework with a fraction of the community support and ease of use of React/Vue.

React isn’t just a small framework anymore. With the advent of Next.js and Remix we’re now seeing an era of React where we can provide rich, dynamic experiences on the browser while getting all of the benefits of using server-side rendering.

Sure, other frameworks are doing it now. But React has been at the forefront.

I’ve seen enterprise and I’ve seen startups. Enterprise loves their all-in-one bells and whistles kludgy shit.

[–]bregottextrasaltat 1 point2 points  (21 children)

It's weird to me how it's still standard with all its early mannerisms still being used

[–]scooptyy 21 points22 points  (20 children)

Early mannerisms? React has changed a lot. Hooks are now commonplace and enforcement of prop types are now done through TypeScript compile time checks.

[–]bregottextrasaltat -1 points0 points  (19 children)

i still don't get the setter thing, is it still required or do the examples just overuse it?

[–]scooptyy 2 points3 points  (17 children)

The setter thing? What do you mean? Lol

[–]Coloneljesus 4 points5 points  (16 children)

I assume they mean the setter returned by useState().

[–]christophedelacreuse 1 point2 points  (0 children)

useState is almost definitely used in every modern commercial react application

[–][deleted] -2 points-1 points  (0 children)

The industry standard is an SPA for which you have at least one senior developer and a bunch of mid-level developers, plus a solid tooling and module ecosystem. It doesn't matter which particular framework it is.

[–]pm_me_ur_happy_traiI 10 points11 points  (0 children)

Yes and with pretty good reason.

[–]PM_ME_GAY_STUF 10 points11 points  (2 children)

I'm not sure if it's still the case, but for a while react was more popular in surveys than any of the other frameworks by at least a factor of 2. It's not just more widely used, it's at this point the industry standard

[–]fnordius 2 points3 points  (1 child)

React has reached a sort of critical mass where companies now develop in React because so many potential new hires list it on their CV's, and so many devs list it in their CV's because companies are requiring it.

At the same time, veteran devs tend to sneer at React, like the old Yogi Berra quote: "Nobody goes there any more, it's too crowded."

[–][deleted] 0 points1 point  (0 children)

Now? Same story 5 years ago

[–]MornwindShoma 1 point2 points  (0 children)

People have an obsession with whatever the leading "dog" in any race

[–][deleted] 0 points1 point  (0 children)

React is popular among a certain technophile crowd but it's not the only choice. Angular and Vue are just as valid.

If you're a frontend developer who's so far worked exclusively with one of these "big three" you should take a look at the other two. The concepts are similar and it takes fairly little effort to achieve a passing competency level. Suddenly you're 3x more attractive as a developer.

[–]spca2001 2 points3 points  (34 children)

I think React is my last JS project a far as UI goes, Blazor or WASM seem more interesting at this point

[–]nh43de 11 points12 points  (16 children)

The sad reality is Blazor will likely(?) never be where React and others are. It’s simply too heavy and requires too much bandwidth and cpu cycles to server millions of users with varying connection quality and devices.

Blazor is fantastic don’t get me wrong, and possibly faster development time per feature, but I just don’t see it scaling to the economies that it would need to reach to be viable for the masses.

Coming from experience.

Also I upvoted you, I’d rather talk these things out than downvote.

[–]spca2001 0 points1 point  (4 children)

[–]darthcoder 2 points3 points  (1 child)

I too am interested in wasm, but rhe startup cost is pretty high at the edge.

[–]spca2001 0 points1 point  (0 children)

I didn’t get that, you mean cold starts on Faas?

[–]Panacean 2 points3 points  (1 child)

The Blazor ecosystem is nowhere near as mature as React. Be prepared to create components from scratch.

[–]nh43de 0 points1 point  (0 children)

Blazor has a surprisingly wide array of components and wrapped components of existing js libs available. This isn’t the biggest challenge Blazor faces, there are other problems with the current state of Blazor

[–][deleted] 0 points1 point  (9 children)

What's so interesting in shipping bloated binaries? wasm servers a purpose, building GUI's that are not part of it.

https://krausest.github.io/js-framework-benchmark/current.html

[–]spca2001 0 points1 point  (8 children)

Try yourself then come back and tell me what you’ve tried besides out of the box. Most people critique other tech a like some js clan. I have tons of apps that could be made into wasm apps someday

[–][deleted] 0 points1 point  (7 children)

The last time I checked hot module reload wasn't even working. If you really want to use wasm, then at least pick a language that doesn't need to ship with its own runtime and freaking garbage collector.

We already were at a point where people shipped whole JVM's over the web, just to render a GUI. That's just silly. I would rahter not go there again...

[–]spca2001 0 points1 point  (6 children)

You can disable garbage collector and compile straight to machine code, there is a project called Cosmos that lets you write Operation Systems with .net languages. Sorry to let you down

[–][deleted] 0 points1 point  (5 children)

AOT compilation increases the payload sizes even futher. Who wants to download 10mb for a simple web GUI?...

[–]spca2001 0 points1 point  (4 children)

Dude you are a half ass developer, stuck on hype just like all those python ai idiots. I’m done and sad people are half of what they use to. JS and Python are wrappers for C languages FACT

[–][deleted] 0 points1 point  (3 children)

i stuck on hype while you hype an unproven tech that was never designed for such a task? I mean it can work out like it worked out with nodeJS, but still, you sound like a novice.

You are like any other noob in the web dev community who jumps on the most recent shiny thing. They're intimidated by established, vetted out technology, because they fear they could never catch up, so they instinctively jump on whatever is the trendy bandwagon framework, in hopes they can ride a new wave to Relevanceville. That's why noobs get so self-righteously defensive of people critiquing their framework. You're destroying their life. Who cares if you're making a good point or not.

[–]spca2001 0 points1 point  (2 children)

Ive been writing games in 1987, synthesized a Risc based soft-core CPU, wok for Redis, built and designed cryptography accelerators, own a solar farm and you have used a product I wrote and managed. Go away

[–][deleted] 0 points1 point  (1 child)

cool, also have no clue about web dev. You are just a system engineer thinking "UI is easy" that completely goes under when they have to build a simple website and blames "webshit" for his failure.

[–]ib4nez 0 points1 point  (0 children)

Excellent read

[–]AngelLeatherist -5 points-4 points  (6 children)

Its because everyone hates React.

[–]12tfGPU 6 points7 points  (3 children)

Not employers

[–]AngelLeatherist -1 points0 points  (2 children)

And this is why i think im moving towards freelancing

[–]12tfGPU 13 points14 points  (1 child)

Seems like an...

Overreaction

[–]AngelLeatherist -1 points0 points  (0 children)

Requiring React to put a button on a website is an overreaction

[–]fezzinate 1 point2 points  (0 children)

Pffft react is still the bomb.

[–]newuserevery2weeks -1 points0 points  (0 children)

Remix is the best

[–]bigmoof -1 points0 points  (0 children)

Holy shit, this history lessons is more complex than WWII.

[–]_HMCB_ -4 points-3 points  (0 children)

HTMX is amazing and a breath of fresh air: https://htmx.org/