Earlier quoted context omitted.
If you're the CTO of a new startup, don't pick a technology to build your startup in without building something with that technology first. Build something small. Learn React. When you're comfortable, and your small app grows in to something a bit bigger that might merit it, learn Redux. Then, build something small. Learn Vue. Repeat. Now you understand both options enough to make an educated decision. Feel confident…
Certainly, and that's the way to do it. My point is, you end up converging on learning Redux. You really do learn Redux no matter what, so it's kind of a myth that you "don't need to learn Redux." Theoretically, you can get by without learning it. In practice, the moment you try to build a real company, you need it. That necessitates learning Redux. I think this is an uncomfortable thought because it implies that Vue…
How we do Vue at GitLab: one year later
51–60 of 208 posts
Re: How we do Vue at GitLab: one year later
#52Earlier quoted context omitted.
I refuse to believe VueX is any simpler than Redux: https://github.com/vuejs/vuex/blob/dev/examples/counter/stor... Also you don't have to import your actions, it's just a smart thing to do. This gives me heartache a bit: https://github.com/vuejs/vuex/blob/dev/examples/counter/Coun...
It's not, it's literally the same (they said VueX is based on Redux). The difference is React.
Vuex & Vue are the easier APIs to learn. Not only that the developer ergonomics are just better for Vue's API. For example in vue you have "mounted()" instead of "componentDidMount()" or "ngOnInit()". Likewise, redux requires learning CS terms (if you don't know them) like thunk, saga, memoized selectors, etc. Vue uses more layman's terms, like "computed" instead of "memoized selector" which just makes it easier to learn.
My big hangup with Vue is having to declare reactive properties up front. It's author says this is a best practice anyways, but it leads to hard to debug issues when you accidentally declare new properties at runtime & you get race conditions. With react & redux both making immutability possible & encouraging immutability, you get easier to debug apps. But there is a more up front investment.
I also really love Vue's single file components. I know you can do that in Angular & React, but again the API is just so much more ergonomic in Vue.
Re: How we do Vue at GitLab: one year later
#53I 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…
Re: How we do Vue at GitLab: one year later
#54Earlier quoted context omitted.
Certainly, and that's the way to do it. My point is, you end up converging on learning Redux. You really do learn Redux no matter what, so it's kind of a myth that you "don't need to learn Redux." Theoretically, you can get by without learning it. In practice, the moment you try to build a real company, you need it. That necessitates learning Redux. I think this is an uncomfortable thought because it implies that Vue…
I don't understand your argument -- wouldn't it follow then that Vue devs converge on learning VueX? VueX is very similar to Redux, I don't see how that's a point in Vue's favor if our metric is time spent learning.
You have to take yourself out of the "experienced React+Redux dev" mindset and put yourself in the shoes of "Experienced dev looking to invest in one of two ecosystems" mindset. Which one is the path of least resistance?
The point is, React+Redux people would love to believe that it's "Vue+VueX." But in reality, it feels like "just vue." A sword is stronger as a single piece, and Vue+VueX feels like a single piece.
It's up to people to learn both and decide for themselves, but my argument is simply this: it's a mistake to underestimate the traction Vue is gaining.
There's a strong temptation to blame the dev: They're not smart enough, they should have been able to pick up Redux easier, Vue+VueX is the same as React+Redux. But all I can do is report my experiences, and an honest survey of the ecosystem would lead us to conclude that Vue+VueX is far easier to learn without sacrificing any flexibility for your company in the long run.
Re: How we do Vue at GitLab: one year later
#55I 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…
Re: How we do Vue at GitLab: one year later
#56Earlier quoted context omitted.
I don't understand your argument -- wouldn't it follow then that Vue devs converge on learning VueX? VueX is very similar to Redux, I don't see how that's a point in Vue's favor if our metric is time spent learning.
It's roughly a bajillion times easier to learn. And that counts for a lot. You have to take yourself out of the "experienced React+Redux dev" mindset and put yourself in the shoes of "Experienced dev looking to invest in one of two ecosystems" mindset. Which one is the path of least resistance? The point is, React+Redux people would love to believe that it's "Vue+VueX." But in reality, it feels like "just vue." A swo…
To be clear: I like both React and Vue and am fundamentally skeptical of arguments that one is significantly better/worse/different than the other.
Re: How we do Vue at GitLab: one year later
#57At 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 ) }
> Our designer could churn out neat html/css, but was a beginner in Javascript.
I write JS every day, and frankly that code looks like an unholy mess to me, so I can't imagine what it looks like to a beginner. Is "styled.div``" a function call? It's not self-evident. How do you do inheritance? Is that a template string with functions inside it? Would that CSS autocomplete?
That code looks very much like it sacrifices ease of writing CSS for ease of writing JSX. That isn't the correct tradeoff for everyone.
Re: How we do Vue at GitLab: one year later
#58React 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.
Re: How we do Vue at GitLab: one year later
#59At 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…
Re: How we do Vue at GitLab: one year later
#60At 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 ) }