News for hackers. Stuff that matters.
Re:Vue.js 3 by swyx on Friday September 18, 2020 @04:36PM (#24521636)
i'm afraid this is pretty much plain wrong. react and svelte also support incremental adoption, and i dont know angular but i'd hazard there's a way to do it too if you bothered to ask angular devs.

what you're responding to is marketing, which Vue has done an effective job of. thats fine, but it is unfair of you to conclude "Gradual adoption is a feature / selling point not many web development frameworks can claim."

Re:Vue.js 3 by gavinray on Friday September 18, 2020 @04:53PM (#24521787)
I think the original commenter might have intended to mean without additional build tooling?

While it isn't pretty, you can drop Vue in a <script> tag on a page and define components with template strings.

In React, you can technically do this, but you need to either:

A. Use React.createElement() calls

B. Use something like "htm" also included via a <script> tag, with template literal tags to wrap your component renders

You can technically include Babel in a <script> tag to use JSX, but it only works with <script> blocks that have been tagged as "JSX", not within regular ".js" files you can import using "src="

Jason Miller a-la Preact is the person I see most consistently working on and pushing this sort of React/Preact no-build setup. I definitely get the appeal, for this exact usecase -- you have a simple, mostly-static website (or something old and built with jQuery) and you want to incrementally modernize it/add functionality without rewriting the whole thing.

https://twitter.com/_developit/status/1220102334048624643

Re:Vue.js 3 by SPascareli13 on Friday September 18, 2020 @06:43PM (#24522570)
I can tell you that not only he is right, but I've used Vue for exactly that purpose before and works like a charm.

You can go pretty far using Vue with a <script> tag before you start needing build tooling.

Re:Vue.js 3 by andrewflnr on Friday September 18, 2020 @09:06PM (#24523790)
That's not where they were wrong.
Re:Vue.js 3 by AsyncAwait on Saturday September 19, 2020 @06:56AM (#24526558)
Look, I've used both Vue and React for this purpose and Vue is just easier to integrate. React can do it too, but Vue places an emphasis on it and it shows.
Re:Vue.js 3 by andrewflnr on Saturday September 19, 2020 @02:25PM (#24529461)
Yes, but that's a different and less flame-baity claim than the top-level's "Vue is the only one".
Re:Vue.js 3 by holtalanm on Friday September 18, 2020 @06:52PM (#24522619)
as someone who has used both Vue and React in a _very_ legacy system, I can say unequivocally that Vue was massively easier to integrate into our system than React was.
Re:Vue.js 3 by hobby-coder-guy on Friday September 18, 2020 @04:59PM (#24521838)
Svelte. Popular.