I stopped reading at "both are fast and light weight" because I don't find react to be "light weight". React is 275K (nearly a quarter of a meg) when it is minified and gzipped. 750K when it is not minified/gziped. We're talking about a web page UI here. It should be tiny for users with slow connections. React seems big to me and I can't justify it except in very large applications. As such, I struggle to find the re…
> React is 275K (nearly a quarter of a meg) when it is minified and gzipped. 750K when it is not minified/gziped. That statement is completely false. react@15.5.4: react.min.js is 21335 bytes uncompressed, 7353 bytes gzipped.
Switching From React To Vue.js
121–130 of 186 posts
Re: Switching From React To Vue.js
#122Do people like Vue because it's more declarative than react? Is it mostly angular devs switching and getting the best of react but still having directives? I like the control react gives me without the black box 'compiler' which seems like it makes a bunch more choices for you. I'm probably biased, someone cmv?
I hate directives. There is nothing you can do with them you can't do with just plain callbacks or putting React components inside another that renders its children. HTML templating directives are stupid too, I find myself looking up syntax references for angular even though I've used it for ages. (Think semicolons and magic variables like `$event` or `index` in *ngFor bindings – you don't need these unfortunate and…
Re: Switching From React To Vue.js
#123Re: Switching From React To Vue.js
#124There is a bit of React kool-aid in here, makes me really wonder if any of them have actually tried using Vue because the benefits and improvements you will see with Vue are immediately noticed. To be frank, the OP actually did a poor job of presenting Vue here because it only mentioned the similarities, which doesn't do any good for Vue. It did not get into areas where Vue is better than React, which is what most wo…
I'd love to see you elaborate. Your post is just Vue Kool aid.
Secondly, you are not tied to JSX. While you can use JSX with Vue, it comes with a very simple and clean templating language that is much more natural to manipulate than mixing JS and a fake HTML.
What's more, you don't need webpack, not even babel to use Vue. You can actually drop the 30ko (gzip + minified) of the lib and create a decent projet as-is. Of course you can later setup a whole pipeline, with even server side rendering if you wish. But for a start, you can just use it as easily has you used to with jquery. Which means people comming to the project will be easy to train to: it takes one afternoon to comprehend react hello world. It's the time to understand the whole Vue lib.
Eventually the community is great : the doc is well written, the tooling is full of small details (such as .once.prevent or the dict classes) that makes your life easier and the API surface is kept small. Most third party tools adopt the same philosophy: pragmatic, useful, scale down then up.
Honestly after so much react, I'm happy I found Vue. It's just better. Doing training for both, I can also tell you that training for Vue is 2 orders of magnitude easier than react.
Vue is what react should have been really. But let's not blame react. The react dev created shoulders for the vue devs to stand one.
Re: Switching From React To Vue.js
#125Re: Switching From React To Vue.js
#126I stopped reading at "both are fast and light weight" because I don't find react to be "light weight". React is 275K (nearly a quarter of a meg) when it is minified and gzipped. 750K when it is not minified/gziped. We're talking about a web page UI here. It should be tiny for users with slow connections. React seems big to me and I can't justify it except in very large applications. As such, I struggle to find the re…
> As such, I struggle to find the reason React is so popular. Uhm, React websites run great in Chrome on a MacBook Pro. You seem to think that most web developers care about users on slow connections.
Re: Switching From React To Vue.js
#127Earlier quoted context omitted.
> React is 275K (nearly a quarter of a meg) when it is minified and gzipped. 750K when it is not minified/gziped. That statement is completely false. react@15.5.4: react.min.js is 21335 bytes uncompressed, 7353 bytes gzipped.
I'm including everything you need to deploy in those numbers. You included only React and not React-Dom. My own try at setting up React results in a 750k js file when I follow the instructions below. I realize this isn't minified yet and I welcome feedback on how to make it better. https://www.joeldare.com/blog/post/create-a-react-app/ The top search results for react minified size show similar numbers to my 250k. Th…
https://webpack.github.io/docs/list-of-plugins.html#uglifyjs...
Re: Switching From React To Vue.js
#128Things you're sacrificing when going away from React: 1. Stability. FB uses it for their main product, which is probably the biggest web app of them all, they pay many devs to work fulltime on it. People coming from Angular, who had to migrate all those breaking changes over the years know the struggle. 2. Options like React-Native, React-VR and co. React enables your devs to acquire a whole new range of possibilitie…
For me, the instability and unopinionated nature of the group of technologies that loosely define "React" have been a real turn off. When answers to questions like "What language should you program in?", "How should you store your data?" and "How should I handle routing between pages?" all have no specific answer, it leads to a fragmentation of knowledge that in my past experience usually leads to a technology's demise.
Re: Switching From React To Vue.js
#129Earlier quoted context omitted.
I'd love to see you elaborate. Your post is just Vue Kool aid.
Well, first, vue.js doesn't force you to use components. So you can just throw your data into the HTML page and see what happens. It's a huge win in the early phase of the project, as most of the time your page will change so much you will not see any reusable components before months. It's a real time saver, and let you refactor only the important parts in components later. Secondly, you are not tied to JSX. While y…
Re: Switching From React To Vue.js
#130Earlier quoted context omitted.
react-router, do you mean v1, v2, v3, or v4 (or perhaps v5 and v6, I haven't checked if there was a new release with breaking API changes during the past 12 hours).
I mean react-router is almost a 3 year old library trying to handle a rather complex problem. The first three versions were largely the same with no major changes that I can think of except for switching from context to higher order functions. I think everyone is a little dramatic about the number of versions of the library, especially when they are going to continue to support v3.