React made me feel stupid, Vue made me feel smart. So I use Vue. I came at it as a long-time jQuery dev with Angular 1 experience.
In general it's best to push your comfort boundaries. It's called learning. I'm not saying React is better than Vue (I honestly think they are very similar). Just that picking a technology based on whether it challenges you or not is probably not the best strategy.
How we do Vue at GitLab: one year later
131–140 of 208 posts
Re: How we do Vue at GitLab: one year later
#132Earlier quoted context omitted.
Vue and jquery works ok together. First, you can gradualy migrate from jquery dom to vue. As both are very light, having both is not bloated. Plus, you need something to do ajax anyway, and if your site uses it, why add axios as well? Actually I'd say that vue is probably the best tech if you want to progressively improve a legacy jquery heavy website instead of doing a complete rewrite.
Isn't fetch widespread enough to use these days?
https://caniuse.com/#search=fetch https://www.netmarketshare.com/browser-market-share.aspx?qpr...
Plus, although fetch is tremendously better than XMLHttpRequest, it still has quirks. It doesn't send cookies by default. The promise resolve on success on code 400 and 500. Headers are verbose. You have to encode and decode json manually. You have to force CORS for it to work.
The end of this article show you the problem:
https://medium.com/@shahata/why-i-wont-be-using-fetch-api-in...
Eventually you end up writting code to wrap fetch. So why not just use jquery or axios ? It's already documented and tested.
Re: How we do Vue at GitLab: one year later
#133At my last job we did a comparison between Vue and React before rewriting a major frontend application. We did a POC in both React/Vue and ended up using Vue mainly due to the following reasons: Single File Components Single file components (.vue files) is the best thing about Vue. I understand this might be a personal preference, but we wanted to avoid CSS-IN-JS. Our designer could churn out neat html/css, but was a…
I agree that single file components are awesome. I wish you had been introduced to styled components in react: import styled from 'styled-components' const Container = styled.div` padding: 10px; background: ${ ({ isHovered }) => isHovered ? 'green' : 'red' }; ` const H1 = styled.h1` font-size: 15px; ` const P = styled.p` font-size: 10px; ` const MyComponent = ({ isHovered }) => { return ( Hello This is a thing ) }
Re: How we do Vue at GitLab: one year later
#134Earlier quoted context omitted.
> I mean, same way with Vue really. If the editor didn't know wtf a Vue file is, you'd lose all the integration too. In a way, that's fair. In another way, the example single component Vue file I linked to is an HTML file. It has a tag and a tag. Just associate .vue with HTML and you're done. That gets to my broader point as well - styled-components reinvents the way you declare styles and the way you apply styles, a…
If you remove styled-component specific tooling from the equation to simplify the argument and just use Glamorous instead of styled-components (which are very close to the same thing except the later is just JS), then it's exactly because of tooling. The reality is that tooling for templates (even Angular or Mustache style) is pretty terrible. Tooling for CSS is just as terrible. Static analysis or doing simple thing…
Vuejs is great. Found it to be easy and simple to understand. Big thumbs up for Evan You.
Re: How we do Vue at GitLab: one year later
#135At my last job we did a comparison between Vue and React before rewriting a major frontend application. We did a POC in both React/Vue and ended up using Vue mainly due to the following reasons: Single File Components Single file components (.vue files) is the best thing about Vue. I understand this might be a personal preference, but we wanted to avoid CSS-IN-JS. Our designer could churn out neat html/css, but was a…
Same. That and the fact it took me an afternoon to get an hello world with react and understand it. And 20 minutes with Vue.
Re: How we do Vue at GitLab: one year later
#136Earlier quoted context omitted.
React is the new JQuery, I really don't see Vue and Angular being in the same world as React.
As far as the actual libraries themselves go, if any of Vue/Angular/React are the new jQuery, it's Vue. It's the smallest of the three, but more importantly it's the easiest of the three to drop into a page without any tooling.
Any application that I've built which actually required a technology like Vue or React was a significant undertaking and a few hours getting up and going (not that either of them require anywhere close to that) is nothing.
Re: How we do Vue at GitLab: one year later
#137Earlier quoted context omitted.
Even if you ignore 2-way-binding?
The whole component russian dolls with data/callback passing is something most beginers have a very hard time to grasp. Add webpack to the mix, make them fight with JSX that doesn't want to do what they need and voila, you get a sad student. Starting with vue is just: add a script tag, put your template here, now your data here. Done. The start up experience is nothing alike.
Re: How we do Vue at GitLab: one year later
#138Earlier quoted context omitted.
Same. That and the fact it took me an afternoon to get an hello world with react and understand it. And 20 minutes with Vue.
Which order did you attempt to learn them in? Is it possible taking the time to attempt to learn react affected how easy it was to pick up Vue? I know we love to hate on React here but they are very similar. Can you identify what in particular is so confusing with regards to react vs. vue? They have a very similar API.
In summary, vue offers a simpler hands on experience while allowing smooth learning curve to more complicated setup matching react's.
React just throws you in unkown waters and say 'now swim'. And on the side of the river, 3 persons are screaming to you contradictory advices.
Re: How we do Vue at GitLab: one year later
#139Earlier quoted context omitted.
As far as the actual libraries themselves go, if any of Vue/Angular/React are the new jQuery, it's Vue. It's the smallest of the three, but more importantly it's the easiest of the three to drop into a page without any tooling.
I have a hard time understanding why this "drop in" experience is so important. Are you all writing simple contact us forms or something incredibly simple? Any application that I've built which actually required a technology like Vue or React was a significant undertaking and a few hours getting up and going (not that either of them require anywhere close to that) is nothing.
Secondly, a lot of my projects just don't need anything else. If i have a 2 weeks contract with a client, i'm not going to setup webpack, a ci server and docker.
Having the choice to scale up or down is an amazing feature.
Re: How we do Vue at GitLab: one year later
#140Earlier quoted context omitted.
The whole component russian dolls with data/callback passing is something most beginers have a very hard time to grasp. Add webpack to the mix, make them fight with JSX that doesn't want to do what they need and voila, you get a sad student. Starting with vue is just: add a script tag, put your template here, now your data here. Done. The start up experience is nothing alike.
Uh, you pass data & callbacks through props in vue also, unless you use a single component. Why not just compare it to using a single component in react then also and be honest?