News for hackers. Stuff that matters.
Re:Vue 3 as the New Default by DaiPlusPlus on Monday February 07, 2022 @05:14PM (#30252119)
Some day, eventually, after all the dust settles in the JS ecosystem, there will be a stable framework for managing UI state in a sane, sensible, predictable and well-understood manner - and someone at the WHATWG/W3C will finally write up a spec and the functionality will be baked-into Chrome, Edge, Firefox, etc.

And we'll be free from having to learn a new JS framework every 6 months. And maybe even npm hell too.

Until then, time to buy another Pluralsign training course...

Re:Vue 3 as the New Default by dham on Monday February 07, 2022 @06:00PM (#30252692)
If W3C would stop doing initiatives like Web USB and give us a way to style a select box (finally going to be a thing) we wouldn't even need web frameworks.

* Styled select boxes

* Good cross platform datepicker with ranges that looks good

* More form validation options / dynamic form validation

* A good drag api that does edge detection well in every browser

* Bring back frames (would allow good nested routing)

* A built in rich text editor

* A good modal API (or bring it back)

* A way to submit a form via AJAX with just a property (think Rails UJS) to just render html.

Re:Vue 3 as the New Default by sippeangelo on Monday February 07, 2022 @09:28PM (#30254262)
Please just give me a checkbox input that sends true/false instead of true/nothing
Re:Vue 3 as the New Default by DaiPlusPlus on Monday February 07, 2022 @11:47PM (#30254993)
I agree radio and checkbox inputs are still huge warts in HTML forms, though there is a workaround: if you have a hidden input with the same name and "false" value then you'll get what you want. See here for an example: https://stackoverflow.com/questions/2697299/
Re:Vue 3 as the New Default by earthboundkid on Tuesday February 08, 2022 @01:13PM (#30262127)
"Web Component" is a great name, but Shadow DOM and Custom Element are terrible APIs. WHATWG should just quietly abandon them and then come up with "Web Components 2.0" based on a native reactivity system, native VDOM diffing, and (this already a thing) CSS layers for style isolation.
Re:Vue 3 as the New Default by no_way on Tuesday February 08, 2022 @01:39AM (#30255558)
Re:Vue 3 as the New Default by dham on Tuesday February 08, 2022 @08:21AM (#30258028)
Yes, gotcha. That's why I have in parenthesis

> (finally going to be a thing)

Re:Vue 3 as the New Default by Seb-C on Tuesday February 08, 2022 @11:31AM (#30260457)
I've been thinking like forever that if we had a standard, pure-html equivalent to jQuery's `$('.foo').load('url...')`, we could have a lot of great sites without any JS at all (I'm not talking about the minority of legit cases where react/vue/angular shines).

Similar to a link targetting an iframe, but without an actually ugly iframe.

Re:Vue 3 as the New Default by earthboundkid on Tuesday February 08, 2022 @01:14PM (#30262142)
Are you familiar with HTMX? Sounds like what you want. I'm not a huge fan, but I think it would be good if something like it were a native capability.
Re:Vue 3 as the New Default by Seb-C on Wednesday February 09, 2022 @11:17AM (#30274409)
Yes, that's the same core idea. I mean, there are plenty of solutions in JS, and it's a one-liner with fetch anyway, but having a native way would have been cool.

I was thinking about something more like `<a href="..." target="#someDiv">`.

That could be some handy (albeit rudimentary) foundation to build maintainable sites on a static server without any JS or build pipeline.

Re:Vue 3 as the New Default by andrei_says_ on Monday February 07, 2022 @06:13PM (#30252834)
Styling a radio button, a select box and a slider would be amazing, too.

Now the only option is to replace them which is quite sad.

Re:Vue 3 as the New Default by dham on Monday February 07, 2022 @06:18PM (#30252876)
Yea you're right, that's like the biggest one. Can't believe I forgot that.
Re:Vue 3 as the New Default by DaiPlusPlus on Monday February 07, 2022 @06:45PM (#30253160)
Last year they introduced the CSS `accent-color` property: https://www.w3.org/TR/css-ui-4/
Re:Vue 3 as the New Default by andrei_says_ on Wednesday February 09, 2022 @09:41AM (#30273131)
I’d like to make them larger and easier to target. It’s trivial to do this for form fields.
Re:Vue 3 as the New Default by justsomehnguy on Monday February 07, 2022 @06:09PM (#30252777)
> and give us a way to style a select box

How many end-users complained what a select box is not styled?

Re:Vue 3 as the New Default by dham on Monday February 07, 2022 @06:10PM (#30252793)
I hear you, that's another thing that has plagued our industry. Most of the time a regular select box is fine, but sometimes you need to have images or something more in the options (colors, etc)
Re:Vue 3 as the New Default by brimble on Monday February 07, 2022 @08:47PM (#30254010)
None, probably, but these days it's de rigeur to spend half a (web or mobile) project's budget making sure even the select boxes are "on brand" and "delightful" or whatever. Often at the expense of usability.
Re:Vue 3 as the New Default by arnvald on Monday February 07, 2022 @05:25PM (#30252228)
Is is really that bad?

I'm not very up-to-date with JS frameworks, so please bear with me. I know that new libraries pop up here and there, but if I'm not wrong, React is by far the most popular, and React has been around for almost 10 years. Vue's not much younger, and now it's 3rd major version.

Is there such a big difference between JS front-end frameworks and the rest of the world?

Re:Vue 3 as the New Default by grayrest on Monday February 07, 2022 @05:42PM (#30252446)
The ecosystem largely settled out in 2014 when everybody was "javascript fatigue" complaining. The developments since have mostly been refinements on details of the development setup or state management. There's new stuff but I'm pretty sure anybody who wrote React at the time would be comfortable with the slight modifications in the patterns of how things fit together.

We're kind of into the next generation of frameworks (Solid, Svelte 3, Vue 3) and that's more about how much JS is getting delivered to the client. The current area of exploration is "partial hydration" where the goal is to write stuff using the component model but do server rendering and only send JS for the parts of the page that'll change client side. For quite a few classes of application this would substantially reduce the size of JS over the wire. All this is less of a benefit than the state control React brought so I expect slower/partial adoption.

More broadly, there's been a resurgence of the render everything on the server and send html diffs approach in the form of alpine and htmx. The other potential area for change on the horizon is web assembly getting host bindings support so it doesn't have to bridge through JS to affect the DOM and other browser APIs.

Re:Vue 3 as the New Default by arnvald on Monday February 07, 2022 @06:01PM (#30252707)
Thanks for a thorough explanation! I've heard about NextJS, NuxtJS etc. and I know they're built on top of React and Vue, but didn't really know what kind of value they provided, now that's clearer.
Re:Vue 3 as the New Default by xdennis on Monday February 07, 2022 @06:49PM (#30253192)
I'm not sure about that. 2014 is when Webpack was released and React was released the year prior.

Maybe one or two years after that.

Re:Vue 3 as the New Default by EMM_386 on Monday February 07, 2022 @05:29PM (#30252279)
> Is is really that bad?

It's not that bad. I am lead on a large Angular 13 project and we love it, easy to work with, build, deploy. We have literally no issues at the moment. .Net 6 C# APIs on the back-end, Oracle database. It just works.

Take everything with a grain of salt.

Re:Vue 3 as the New Default by pier25 on Monday February 07, 2022 @06:29PM (#30252996)
As a user, big Angular apps feel super slow and bloated.

Eg: Google Cloud console downloads like 20MB of resources.

Maybe the DX is good, but from an end user perspective, Angular is far from good.

Re:Vue 3 as the New Default by Alex3917 on Monday February 07, 2022 @08:18PM (#30253839)
> Google Cloud console downloads like 20MB of resources.

That's literally the biggest (publicly known) Angular app in existence, and the fact that it's slow doesn't have anything to do with Angular. E.g. FWD:Everyone pages load in well under half a second:

https://www.fwdeveryone.com/t/K3KKGbMyQbaCGDc-izuaow/venmo-f...

At this point the main things preventing it from being faster are the TTFB from CloudFront, and the fact that Bootstrap is used as a dependency.

Re:Vue 3 as the New Default by EMM_386 on Monday February 07, 2022 @07:26PM (#30253487)
> Eg: Google Cloud console downloads like 20MB of resources.

That must be a fairly large application. Consider they are pushing it internally, I have no idea how optimized that is.

When you consider this is cached, that means you only have to do that once until an update. Similar to any other software.

Look at what Electron apps do in terms of constant updates. This is similar, but it's a web page.

Re:Vue 3 as the New Default by pier25 on Tuesday February 08, 2022 @12:41PM (#30261612)
This is just on first page you load. As you navigate it loads a LOT more more stuff. I opened the console and it loaded like 20MB, then I navigated to another section and it loaded 15MB more.

And the problem is not only the bytes loaded but how clunky and slow it is in general.

The Electron argument doesn't make any sense as it includes two runtimes ffs.

Re:Vue 3 as the New Default by Alex3917 on Monday February 07, 2022 @05:40PM (#30252428)
I feel the same way about Angular. There some minor bugs that have had open issues for 5+ years and may well never get fixed, but by and large the day-to-day experience of writing and maintaining code is pretty great.

I just don't get the concept of people being like, I'm going to start a project that's likely going to take the ten years to become successful, but I'm not willing to spend the twenty hours to read the documentation so that it will be successful.

Re:Vue 3 as the New Default by oblio on Monday February 07, 2022 @05:31PM (#30252307)
How is internationalization?

Last I asked, it was still a tire fire, even after more than a dozen versions and after a fully mature previous framework that was replaced :-(

Re:Vue 3 as the New Default by FinalBriefing on Monday February 07, 2022 @05:45PM (#30252477)
Yea...Angular made a huge (and hardly documented) change to their internationalization library that forced us to migrate to a third-party one.

Basically, they now (as of Angular 12) force you to build a difference version of your app for each language you support, and either serve them up at different URLs or use cookies to serve up the right version to each user. The technical reasons make sense...your translations occur at build-time, rather than at run-time, but it's a pretty drastic change that occurred out of nowhere.

Not a fan.

Re:Vue 3 as the New Default by tlrobinson on Monday February 07, 2022 @07:16PM (#30253410)
Are you required to use Angular’s i18n support for some reason?

I use ttag (https://ttag.js.org) with React and like it. I don’t see any reason you couldn’t use it (or another library) with Angular.

Re:Vue 3 as the New Default by oblio on Tuesday February 08, 2022 @06:14AM (#30257129)
Angular tries to be a 1 stop shop and internationalization is a major feature.
Re:Vue 3 as the New Default by tlrobinson on Saturday February 12, 2022 @11:53AM (#30314180)
That doesn’t necessarily mean you have to use it.
Re:Vue 3 as the New Default by ipaddr on Monday February 07, 2022 @08:17PM (#30253829)
Hardcoding a language variable into multiple builds?
Re:Vue 3 as the New Default by bussyfumes on Monday February 07, 2022 @05:38PM (#30252394)
I think it’s a bit of an outdated stereotype from back in the day when this kind of frameworks started popping up left and right. It was a major shift from jquery-based sites/apps which scared many people away from diving deeper into front end. Nowadays you can stick to one of the major three and you’ll be fine for the foreseeable future. This new Vue version is the most disruptive change we’ve had since a long time ago in the fe framework space and it’s still ok to get used to.
Re:Vue 3 as the New Default by FinalBriefing on Monday February 07, 2022 @05:46PM (#30252490)
Yea, most of my Vue 3 components look just like my Vue 2 components (which look a lot like Vue 1 components). Really easy transition for devs.
Re:Vue 3 as the New Default by qbasic_forever on Monday February 07, 2022 @05:39PM (#30252402)
I think a lot of people got a bad taste from webpack, gulp, etc. projects ~5 years ago that immediately mired you in deep config complexity to do anything. Nowadays there's a lot more documentation and emphasis on zero config / convention / CLI tooling to remove a lot of that complexity. Things are a lot better nowadays, especially if you're doing something greenfield and can use the latest tooling like vite, esbuild, etc.
Re:Vue 3 as the New Default by e12e on Monday February 07, 2022 @05:56PM (#30252632)
>... especially if you're doing something greenfield and can use the latest tooling like vite, esbuild, etc.

Well, kinda? I tried to set up typescript, storyboard and tailwind the other day, via create-react-app - and it's not really clear if I can/should use npm or yarn, and what, if any bundles like webpack or esbuild/craco I need... Nor did any of the documentation/tutorials "just work" - and as final punishment I think I had to download more than a gig of dependencies.

I get that there are many layers of tooling, but when I can't seem to get half the features of qt, nor a gui for 4gl development - it does seem like there's a lot of churn and pain for limited gain.

Re:Vue 3 as the New Default by ipaddr on Monday February 07, 2022 @08:20PM (#30253858)
Here is advice.

Using Laravel with Breeze and the set up just works out of the box.

Re:Vue 3 as the New Default by e12e on Tuesday February 08, 2022 @11:06AM (#30260097)
Appreciated, even if it's not a good match for our other tech for most of these projects. That aside, do I then get Storybook and an easy way to integrate with tailwinduikit?
Re:Vue 3 as the New Default by armchairhacker on Monday February 07, 2022 @06:17PM (#30252874)
Honestly if anything, web frameworks are way ahead of the rest of the world.

The real difficulty is that web UIs have to be very flexible and varied: you have different screen sizes, mobile vs desktop, and every website has a different UI vs native apps all looking similar. And yeah, there are over 100 different web frameworks most which have a particular use case, although you don't have to use the perfect tool for the job. Also, there are a few quirks left over from the old days of HTML/CSS/JavaScript.

But making a basic website nowadays on modern tools is very straightforward. Clone a vite starter project, write out your DOM in React or Vue or Svelte or Solid.js or whatever, and launch a live-server with a browser inspector to fine-tune the design. There are some especially bad JS frameworks (looking at you Meteor), but that's the case for most platforms.

Re:Vue 3 as the New Default by wruza on Monday February 07, 2022 @07:28PM (#30253500)
Honestly if anything, web frameworks are way ahead of the rest of the world

Made me chuckle. Web frameworks are thin-to-medium layers of dealing with bs that web graphics are by nature and design. Their entire purpose orbits around that. Runtimes that do not suffer from these birth traumas don’t even need all that complexity. E.g. with apple core ui libraries you can in hours design a new flex/grid/stack/align/etc geometry container (which takes decades in the web), can animate things, make them cheap-scrollable, sizeable, constrainable out of box. Do you really think that web reflows and size dispatch up and down a hierarchy is a complex issue which only a “top-notch” web tech can solve?

Of course web traditionally was more game-like and does not have any guidelines and presentation standards beyond “reset”, allowing to focus on design better than the rest of the world (and due to widespread nature monopolized by a single platform), but calling frameworks which basically deal with its own shortcomings and ancient issues ahead of the world is pretty misleading.

What exactly is ahead of the world in there? My bet is on reactivity, components, caching and lazy redraws, which “weren’t a thing” before web, because, you know, jquery and comctl32.dll were bad.

making a basic website nowadays on modern tools is very straightforward … and launch a live-server with a browser inspector to fine-tune the design

Ah yes, something we had at VB/Delphi 3 times but not quite as RAD. I mean, maybe launch a live server, drop a query and see live data in design-mode, or enumerate columns and make some of them editable out of box? Or fill a form with master-detail link? You can’t. Web praises primitive/workaround things which nobody even had a name for before, so trivial and obvious and default it was.

Re:Vue 3 as the New Default by ipaddr on Monday February 07, 2022 @08:25PM (#30253884)
I enjoyed vb 6/net why did it die?
Re:Vue 3 as the New Default by NicoJuicy on Monday February 07, 2022 @09:08PM (#30254134)
It still runs everywhere
Re:Vue 3 as the New Default by svachalek on Monday February 07, 2022 @05:35PM (#30252361)
Things were really a mess for a while, maybe 6-7 years ago. Nothing was compatible with anything else, even itself from last month. But nowadays things are pretty stable, if you stay away from the hotness of the month which will be forgotten next month.
Re:Vue 3 as the New Default by themacguffinman on Monday February 07, 2022 @05:56PM (#30252630)
Why are people so obsessed with finding one true way to do everything until the end of time. Things change, things become more diverse, and the world is richer for it. There already are sane, sensible, predictable and well-understood frameworks for it, it's called Vue, it's called React, etc. You don't need a committee to bless it before you can enjoy such a stable environment. This is a lot like the 19th century US Commissioner of Patents saying "Everything that can be invented has been invented." Society and technology won't sit still.

It's your choice to learn a new JS framework every 6 months. If you don't want to use the new thing, then don't. Just make something valuable and use what suits your needs. That's all that has ever mattered.

Re:Vue 3 as the New Default by notapenny on Tuesday February 08, 2022 @06:52AM (#30257384)
Indeed, focus on what to build and how to build it. What you build it in is largely irrelevant.
Re:Vue 3 as the New Default by topicseed on Monday February 07, 2022 @05:21PM (#30252190)
NPM hell is what got me to move from beloved TypeScript to Golang. Coming back to pet projects a few months later was true excruciating pain every single time.

Today, it's Go in the backend and Svelte in the frontend, or vanilla JS for very small and simple tools.

Re:Vue 3 as the New Default by ashishb on Monday February 07, 2022 @05:40PM (#30252419)
As someone who programs on backend, frontend, and Android apps, I can't agree more. Javascript frameworks and NPM hell is terrible. You rarely have the problems in Go/Kotlin/Java world that are considered normal in the NPM world.
Re:Vue 3 as the New Default by adevx on Monday February 07, 2022 @06:08PM (#30252770)
I never understood this npm hell reference people are speaking off. Is this just the drama of updating an outdated inherited project? I've been working with node/npm since the early days and don't consider it worse than what you find in Java, Python or PHP.
Re:Vue 3 as the New Default by ashishb on Monday February 07, 2022 @06:26PM (#30252966)
The latest version of webpack removed polyfill, this broke another dependency, and i had to downgrade the react version to fix that!

Nothing like this did I ever see in the go or kotlin world.

Re:Vue 3 as the New Default by qmmmur on Monday February 07, 2022 @06:51PM (#30253215)
If you depend on a specific behaviour why dont you pin your react version?
Re:Vue 3 as the New Default by ashishb on Monday February 07, 2022 @07:42PM (#30253592)
I learnt that much later. Apparently the current version of webpack that you get by following the official react project setup is missing certain polyfills!
Re:Vue 3 as the New Default by jbreckmckye on Monday February 07, 2022 @07:06PM (#30253340)
Couldn't you have pinned your dependency and / or installed from a lockfile?
Re:Vue 3 as the New Default by jrib on Monday February 07, 2022 @05:54PM (#30252600)
are you leveraging a framework on the backend for Go?
Re:Vue 3 as the New Default by nikanj on Monday February 07, 2022 @05:20PM (#30252183)
Meanwhile my Swing skills from the 1990s remain relevant today. Java might not be hip, but it sure does get the job done for enterprise apps
Re:Vue 3 as the New Default by ioseph on Monday February 07, 2022 @05:27PM (#30252252)
What new framework is being widely adopted that was released in the last 6 months? The most recent one I can think of is Svelte which came out 2016.
Re:Vue 3 as the New Default by powersurge360 on Monday February 07, 2022 @05:45PM (#30252473)
I have been _very_ bullish and excited on LiveView and its cousins from other platforms. Hotwire was the first time it's entered my personal dev world and I've been working on a hobby trivia app since Christmas and it has been an absolute _joy_.

It's obviously not a one to one replacement for an honest to god frontend application, especially one that can be recompiled into an offline capable native app, but where you can use it, it does a lot of lifting.

Re:Vue 3 as the New Default by dham on Monday February 07, 2022 @05:47PM (#30252495)
It's already invented. It's called HTML. You then use whatever language you want to generate it. We were doing it a long time ago with Java Server Faces. Now there's stuff like Liveview and Turbo (Rails community)
Re:Vue 3 as the New Default by whalesalad on Monday February 07, 2022 @05:36PM (#30252373)
I use Vue 3 without the new composition api. It looks and feels more or less like the old Vue.

I actually think things are pretty great these days. Even amongst the different frameworks and tools, things are settling into a common set of ideas and concepts.

If you made the choice to build an app on React/Vue a year or two ago, that decision is still valid today and I think that speaks a lot for how far things have come.

Re:Vue 3 as the New Default by turndown on Monday February 07, 2022 @05:51PM (#30252557)
What do you think of htmx[0]? It feels like something that could actually fit into the HTML standard.

0: https://htmx.org/

Re:Vue 3 as the New Default by tokumei on Monday February 07, 2022 @08:52PM (#30254040)
How does the custom script syntax work? E.g. ‘on click call some_func()’

Is there really a JS script parsing all of that? Seems like there would be performance penalty.

Re:Vue 3 as the New Default by slig on Monday February 07, 2022 @05:40PM (#30252417)
And then it will become "old", exactly like Django/Rails feels today and the wheel will be reinvented with something "better" and more complex.
Re:Vue 3 as the New Default by root_axis on Monday February 07, 2022 @05:46PM (#30252481)
This comment is just low-effort complaining that we see on every JS thread on this site. Vue 3 is an option you don't have to use, same as React, Svelte or just jQuery. The implied suggestion that nobody should ever publish new code is tiring.
Re:Vue 3 as the New Default by DaiPlusPlus on Monday February 07, 2022 @05:56PM (#30252635)
Yes, that was half of my post - but the first half is my hope that eventually the functionality from React/Vue will be built-in to the DOM (or at least baked-in to the browser). We're already half-way there with WebComponents (though I'm not a fan of WebComponents as-is, but that's a tangent).

Also, I still believe that web-pages should be functional without JavaScript. For all of my traditional SSR / non-SPA projects I definitely put effort into ensuring my projects exhibit graceful degradation.

There's already a lot of things we can do without any scripting at all: animations and dynamic content, for example - and we can even use CSS trigger-tricks for basic interactivity (e.g. show/hide toggles) all without scripting. What I'd love to see next is something like WPF/XAML's declarative data-binding in HTML (but in a less broken way...) - and I'd like to be able to submit a <form> element directly as JSON, as well as AJAX-like <form> submissions that don't replace the current document, all without scripting - that's the dream (oh, and CSS positioning relative to an arbitrary named element, I could go on...).

Re:Vue 3 as the New Default by dceddia on Monday February 07, 2022 @08:03PM (#30253751)
> We're already half-way there with WebComponents (though I'm not a fan of WebComponents as-is, but that's a tangent).

I think this is actually not a tangent at all, but rather, it’s kinda the whole point! I doubt we’ll ever get to a point where there’s a single standard, because a single standard can’t satisfy everyone.

Re:Vue 3 as the New Default by irrational on Monday February 07, 2022 @05:54PM (#30252599)
This is me. I really don't like using frameworks/libraries and want it to get baked into the standard library.
Re:Vue 3 as the New Default by notapenny on Tuesday February 08, 2022 @06:55AM (#30257409)
"And we'll be free from having to learn a new JS framework every 6 months"

You are already free from this. The only one putting that pressure on you, is you. Pick something and stick with it, and spend your time learning _how_ to build things, instead of _what_ to build it in.

Re:Vue 3 as the New Default by dwaltrip on Monday February 07, 2022 @07:02PM (#30253309)
Likewise, one day I will achieve transcendence and suffer the ills of the human realm no longer.

I'm totally on board with building better tools and solutions. And with pointing out the flaws of tools as we find them. However it is folly to thing this work will ever end.

Re:Vue 3 as the New Default by lmarcos on Monday February 07, 2022 @05:27PM (#30252250)
I don't think that's gonna happen. The same way modern browser's don't come with a java runtime to run servlets.

Something better (and different) will come after SPAs, and the cycle will start again.

Re:Vue 3 as the New Default by DaiPlusPlus on Monday February 07, 2022 @05:58PM (#30252658)
> The same way modern browser's don't come with a java runtime to run servlets.

Servlets run on the server, I think you meant applets? If so, I'd argue a counter-point: WASM and <canvas>.

Re:Vue 3 as the New Default by rr808 on Monday February 07, 2022 @06:43PM (#30253134)
I think best to skip JS and go straight to webassembly.
Re:Vue 3 as the New Default by visarga on Monday February 07, 2022 @05:47PM (#30252496)
That's how great humans are at generalization, just 10 years of collective search and we reached the web UI enlightenment. /s
Re:Vue 3 as the New Default by wldcordeiro on Monday February 07, 2022 @06:29PM (#30252992)
Yeah because people stopped developing any backend solutions for Python or Ruby because Django and Ruby on Rails exist.
Re:Vue 3 as the New Default by pjmlp on Tuesday February 08, 2022 @06:15AM (#30257135)
Only if you want to play the game, there are plenty of jobs using vanilaJS and <script ...> still works.
Re:Vue 3 as the New Default by forgotmypw17 on Monday February 07, 2022 @10:51PM (#30254725)
I think we already have it, and it's called DOM, CSS, and JavaScript.
Re:Vue 3 as the New Default by _prototype_ on Monday February 07, 2022 @08:13PM (#30253808)
React already has us there
Re:Vue 3 as the New Default by pcurve on Monday February 07, 2022 @06:29PM (#30252990)
The messed up ecosystem keeps millions of people employed!
Re:Vue 3 as the New Default by jbreckmckye on Monday February 07, 2022 @07:09PM (#30253362)
> We'll be free from having to learn a new JS framework every 6 months

The de facto starting point for writing browser applications is React, and that came out almost nine years ago.

Re:Vue 3 as the New Default by yurishimo on Monday February 07, 2022 @07:30PM (#30253515)
It’s hilarious you say this as React is arguably introducing the biggest paradigm shift since hooks (which was also a huge change) with Suspense.

It’s fine to say React is a decade old but the way we write apps with React has drastically changed multiple times with the only real constant being JSX.

And let me be a bit proactive, yes, I know react is backwards compatible for the most part, but similar to PHP, just because the syntax is still supported doesn’t mean that’s the recommended way to write apps today.

React arguably started the churn of JS fatigue we all complain about now.

Re:Vue 3 as the New Default by mikewhy on Monday February 07, 2022 @09:10PM (#30254146)
> the way we write apps with React has drastically changed multiple times with the only real constant being JSX

I don't really agree with this. Sure, we went through createClass -> class -> functions + hooks, but the core is still props, state, and lifecycle.

Re:Vue 3 as the New Default by yurishimo on Monday February 07, 2022 @11:58PM (#30255035)
Eh, agree to disagree. I understand your point, but I think those points you mentioned are also changing.

Take lifecycle. It used to be very explicit. Then hooks turned it into this weird implicit thing where you have to know how use effect works and how to only trigger something once, but then the empty array thing is an anti pattern etc etc. Now with suspense, that lifecycle is changing again in a way. I’ve seen some tutorials where the teacher refactors out of use effect into throwing a promise. But then you can have use effects inside your thrown promise and dealing with module scope potentially.

It’s late and im a little out of it, but to me, this is all a lot of churn and creates long periods of uncertainty as developers try and decide which of these features they want to use and when.

At a certain point it can get really frustrating when it feels like you need to rewrite your app to stay up with “best practices” and attract new talent into your org. It would be one thing if the best practices were making things better functionally, but I find that argument hard to justify for anyone outside of Facebook scale. Angular and Vue stuck with a more traditional lifecycle ideology and there are plenty of apps building at scale on those frameworks. That stability in low level APIs gives a community time to grow and mature without leaving a bunch of people behind.

I honestly believe React would not be anywhere near the scale of what is today based on merit alone. They were lucky to see the demise of angular 1 and learn from that mistake and now Vue is sorta suffering the same way by moving too far away too quickly from 2 to 3.

Anyway, ramble over! :)

Re:Vue 3 as the New Default by filoeleven on Tuesday February 08, 2022 @06:37AM (#30257272)
> But then you can have use effects inside your thrown promise

That doesn’t sound right. The linter will certainly yell at you for doing that, and I’d be surprised if the program did not crash. The “rule of hooks” due to their implementation is that you can only call them from directly inside of a component function block, I.e. not from within an if block or a promise.

Developer choice is one of the things people cite as a reason not to use React already, since you have to pick a router, state management library, etc. What’s a couple more decisions about built-in features? =)

I will say that I feel the opposite way about hooks: I only became interested in using React after hooks were added, because classes in javascript always rubbed me the wrong way, and I want to get as close as possible to functional programming style from start to finish. We’re using it now, and reasoning about the app is much simpler than before. I can’t say how much is due to hooks specifically vs overall React app architecture, but the components are much more pleasing to my eyes!

Re:Vue 3 as the New Default by eBombzor on Monday February 07, 2022 @06:23PM (#30252940)
Why pluralsight specifically?
Re:Vue 3 as the New Default by DaiPlusPlus on Monday February 07, 2022 @06:31PM (#30253012)
I get Pluralsight for free with my MSDN subscription