Live data from Hacker News

How we do Vue at GitLab: one year later

about.gitlab.com

121–130 of 208 posts

Re: How we do Vue at GitLab: one year later

#121
post #30

At 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…

Evaluating Vue and React at the moment:

From the Vue documentation [1]:

>Even if you don’t like the idea of Single-File Components, you can still leverage its hot-reloading and pre-compilation features by separating your JavaScript and CSS into separate files:

  
  
    This will be pre-compiled
    
  
  
If I end up going with Vue, I'd probably do that. It looks like a lot of boilerplate though ...

Is there any tool from the Node ecosystem designed to reduce that boilerplate?

Thanks for any insights!

[1] https://vuejs.org/v2/guide/single-file-components.html#What-...

Re: How we do Vue at GitLab: one year later

#122

Earlier quoted context omitted.

God this is horrible. It's ugly. Hard to read. Things are scattered all over the code. And where is my sass ?

I much prefer putting the styles in a separate {componentName}.scss file, import'ing that into the component and using the Webpack Extract Text Plugin: https://github.com/webpack-contrib/extract-text-webpack-plug... I guess now you have two files per component but to me, it's well worth it.

You can work with two files per component if you must truly put the styling in another file.

One of the boons of react is that you can create a set of reusable base components that can be built upon throughout your app.

If you can code-split the app, lazy-loading components as needed, and if you can cache all of the static app anyway, why does it matter if the presentation is tied to the logic?

The same can be said for vue.js. :)

The two languages have many merits and they both make their own sacrifices. But they are ultimately two peas of a pod.

Like Thor and Loki. But who is Thor and who is Loki? ;)

Re: How we do Vue at GitLab: one year later

#123

I would strongly disagree that it is ok to use jQuery with Vue. I mean sure, it's ok in that most of the time it isn't going to hurt or break anything, at least if you are just using it to query elements from the DOM. However, I would argue that is not ok in that it should never be necessary and it's use would be a code smell to me and indicate that the code in question is likely not using Vue properly. I suspect it…

> However, after doing the research, we found that it is not a good idea to use jQuery with Vue

I have a hard time taking seriously the opinion of someone who bases their sweeping global assertions on "research" and not on actual experience.

Re: How we do Vue at GitLab: one year later

#124

Earlier quoted context omitted.

Nope. Nope. Nope. Trainer here. I train in React and in Vue. My students do 3 times the work with raw vue than in raw react. Every one of them. All the time. It's not even on the same map.

Also a trainer and my students do 6x the amount of work in raw react than with vue. Every one of them, all the time. Looks like Vue sux. EDIT: In case this wasn't clear to you, I made this comment to highlight how ridiculous you sound. I don't know about you, but I don't select my tools based on how easy it is for students to learn them. I am a professional software engineer. Tool selection is driven by requirements.…

I find Vue and angular way more complex then reactjs mainly Due to them having their own syntax and I find jsx far better then template strings.

For a Js developer reactjs would be easy. But if your not that experienced or just HTML guy then I can understand why they find vue/angular easy. Both have a framework built in for routing, css , http. You just need to learn their syntax and nothing much. With reactjs you need to come with your structure, find the correct routing, state managements,css libs etc

Re: How we do Vue at GitLab: one year later

#126
post #3

> We discovered that VueX makes our lives easier. If you are writing a medium to large feature, use VueX. If it's a tiny feature, you might get away without it. I feel like this is Vue starting to get the React treatment. React was (and still is!) a very simple library until people realized they needed to do fancy things to make complex applications manageable. Redux came out, everyone fell in love with it, and React…

Reactjs developers should familiar with other state management libs like mobx or mobxstatetree .

Re: How we do Vue at GitLab: one year later

#127
post #12
post #3

> We discovered that VueX makes our lives easier. If you are writing a medium to large feature, use VueX. If it's a tiny feature, you might get away without it. I feel like this is Vue starting to get the React treatment. React was (and still is!) a very simple library until people realized they needed to do fancy things to make complex applications manageable. Redux came out, everyone fell in love with it, and React…

Funny thing is, Vue wihtout extras is more complex than React without extras.

My students are more productive by 200% with vue

Re: How we do Vue at GitLab: one year later

#128
post #36

Earlier quoted context omitted.

Then it's an unfair comparison. Vue does state management out of the box. React really doesn't. Yeah, it has setState, but that's nothing compared to Vue.

With Vuex?

No, he said out of the box. Vuex is not part of Vue core, it's an extra.

Re: How we do Vue at GitLab: one year later

#129
post #30

At 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 ) }

ugly piece of code

Re: How we do Vue at GitLab: one year later

#130
post #3

> We discovered that VueX makes our lives easier. If you are writing a medium to large feature, use VueX. If it's a tiny feature, you might get away without it. I feel like this is Vue starting to get the React treatment. React was (and still is!) a very simple library until people realized they needed to do fancy things to make complex applications manageable. Redux came out, everyone fell in love with it, and React…

Rookie Vue dev here. I found Vue super easy to understand and to start using for my own simple stuff basically from day 1. Gradually as my tiny projects grew in complexity, I naturally started to feel the need to manage state better. And again, Vue docs led me gradually thru pure-Vue solutions towards VueX. It all felt very naturally, the documentation didn’t push me to anything, just gave me answers at my pace. Can’…

Vue documentation is just superb. Kudos to those wrote it. Evan Yu, in particular. Only those who understand a topic very well can present it so simply.
Post reply on HN