Live data from Hacker News

How we do Vue at GitLab: one year later

about.gitlab.com

111–120 of 208 posts

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

#111
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…

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.

Hello world is not a real world app. I've tried both React and Vue, and in my opinion there's a steeper learning curve with Vue due to the two way binding and all the new directives you have to learn as opposed to React.

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

#112

Earlier quoted context omitted.

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

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.

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

#113
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…

Hey ng12, author here. I totally agree with you. I am the biggest proponents of keeping things simple. I initially was hesitant to introduce Vuex. I've written a few huge apps in Vue without anything else but Vue. The cool thing is you can, of course, continue to do that. But again, you just have to follow some strict patterns. Or, to make it simpler, you can get some help from Vuex and let it help you follow those s…

I guided my (small-ish) team away from VueX when we reached for VueJS earlier this year in an application. I based these decisions, at least in part, off of the GitLab engineering teams efforts, as well, for what it's worth. We are all still happy wth that decision. I don't have much more to add to the discussion but to say that it's very nice knowing that if we reached a certain level of complexity that we could, fairly easily, introduce VueX and be back at our previous pace without a lot of hubbub.

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

#114

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 always see people praise Vue for it's easy to get started with it, but in the end it seems like a strange mix of jQuery and React.

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

#115
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 ) }

Code like parent comment is why I use Intercooler.js [1].

[1] http://intercoolerjs.org

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

#116
post #61

Earlier quoted context omitted.

I strongly disagree. Parent poster specifically states 'as a long time jquery dev...', so their objectives almost certainly do not aline with those of a student. Indeed, "picking a technology based on whether it challenges you or not..." Has almost no value at all for a prudent, real-world dev making real world software.

The problem is experience in jQuery and even Angular 1 are not relevant to the issue of why React (or even Vue for some) may be perceived as difficult. They use a very different model. Emacs was very difficult for me when I first started learning it. It was much more difficult than using a simple text editor (and this was with 10 years of programming experience)! Yet I persevered and you know what? After giving it so…

Curious, how long did it take before you before emacs was your go-to choice?

I'm a big vi and sublime text user but always open for better tooling.

btw - I actually agree with you on the learning thing but React just sucks. I'm able to get shit done with Vue and at the end of the week I haven't wasted three afternoons learning jsx/webpack/deployment/relearning-a-new-way-of-doing-css blah blah. I say this with some hesitation but CSS is a solved problem in my opinion with Sass.

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

#117
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…

I agree. It felt like Vue is rewalking the path of React all over again.

But I think it’s good that there’s competing library, though the problem domain felt eerily similar.

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

#118
post #81

Earlier quoted context omitted.

React is the new JQuery, I really don't see Vue and Angular being in the same world as React.

So, pretty soon we should see youdonotneedreact.com websites popping up?

https://developer.mozilla.org/en-US/docs/Web/Web_Components/...

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

#119
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:

Another issue with CSS-IN-JS seems to be security - as it opens up another vector for cross-sight scripting attacks - see here for example. [1]

If I end up going with React, I'll probably avoid CSS-in-JS outside of React Native.

>You can’t use CSS in react-native apps. But you can use CSS-in-JS with styled-components. [2]

Disclaimer: met James K Nelson of reactarmory.com at #hntokyo on Thursday - otherwise unaffiliated.

[1] https://reactarmory.com/answers/how-can-i-use-css-in-js-secu...

[2] https://reactarmory.com/answers/should-i-use-css-in-js

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

#120

Earlier quoted context omitted.

Hey ng12, author here. I totally agree with you. I am the biggest proponents of keeping things simple. I initially was hesitant to introduce Vuex. I've written a few huge apps in Vue without anything else but Vue. The cool thing is you can, of course, continue to do that. But again, you just have to follow some strict patterns. Or, to make it simpler, you can get some help from Vuex and let it help you follow those s…

I guided my (small-ish) team away from VueX when we reached for VueJS earlier this year in an application. I based these decisions, at least in part, off of the GitLab engineering teams efforts, as well, for what it's worth. We are all still happy wth that decision. I don't have much more to add to the discussion but to say that it's very nice knowing that if we reached a certain level of complexity that we could, fa…

Glad to hear that we influenced your decision.
Post reply on HN