Live data from Hacker News

How we do Vue at GitLab: one year later

about.gitlab.com

11–20 of 208 posts

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

#11
post #2

Why is GitLab putting data into their html? "You can pass your endpoints in through the data attributes." Why store endpoints and other js related data on a DOM element. This sounds like a left over paradigm they kept from their jQuery mindset, or am I mistaken?

[deleted]

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

#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.

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

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

What Vue can do is create a well-designed state management library that works out of the box without umpteen lines of boilerplate... and that's exactly VueX.

If you love to type, though, I highly recommend Redux!

    const ADD_TODO = 'ADD_TODO'
   
    import { ADD_TODO } from '../actionTypes'

    function addTodo(text) {
      return { type: ADD_TODO, text }
    }

    dispatch(addTodo(text))

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

#14
post #13
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…

What Vue can do is create a well-designed state management library that works out of the box without umpteen lines of boilerplate... and that's exactly VueX. If you love to type, though, I highly recommend Redux! const ADD_TODO = 'ADD_TODO' import { ADD_TODO } from '../actionTypes' function addTodo(text) { return { type: ADD_TODO, text } } dispatch(addTodo(text))

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...

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

#15
post #5
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…

When did new react developers start learning redux? From my experience that just isn't true.

I've been learning React lately, and many tutorials, even those targeted at beginners, include Redux. Many seem to be a sort-of cargo cult without any understanding of why they're using Redux, and in many cases, there's no reason to introduce Redux into the mix. I've also noticed a lot of tutorials are content marketing from companies wanting to sell bolt-on services and tools, which is pretty weird; I've never used a language/ecosystem that had so many hangers-on before. And, it leads to the same situation: "Learn React (plus these other complicated things that we want to sell you)!"

I mean, it's necessary, at some point, to see a full system that uses all the tools for delivering a real application. But, it is definitely a lot of concepts to grok at once. I actually found it most useful to see tutorials that started without even using React, and built up from first principles to what React does (given that React is conceptually very simple, this isn't so crazy...a toy version of React can be built in an hour or so, so it's perfect for a video or article; much of the complexity in React is in making it fast rather than in making it work). But, that may not be a necessary first step for people who have more frontend or reactive programming experience than I have.

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

#16
post #14
post #13

Earlier quoted context omitted.

What Vue can do is create a well-designed state management library that works out of the box without umpteen lines of boilerplate... and that's exactly VueX. If you love to type, though, I highly recommend Redux! const ADD_TODO = 'ADD_TODO' import { ADD_TODO } from '../actionTypes' function addTodo(text) { return { type: ADD_TODO, text } } dispatch(addTodo(text))

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.

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

#17
post #10
post #9

Earlier quoted context omitted.

Wow, I wonder where people are getting the idea that they need to learn Redux. If you start a new job at a company that uses React, then you probably need to learn React + Redux simultaneously. But if you're just picking up React, Redux isn't useful whatsoever. This image, from React conf years ago, communicates this sentiment perfectly: https://i.stack.imgur.com/tnk9a.png

I started with Redux too, because the lead dev on a project said it's a must. Now I did two projects without and everything is nice and simple.

It's definitely a must after a certain codebase size. 20k LoC maybe? But for personal projects, no way.

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

#18
post #6
post #4

Earlier quoted context omitted.

Because it works, it's simple (requires not much overhead), and sometimes it's just the best option. This "hurr jQuery and everything it brought sucks" mentality is not good.

HTML is for displaying information, not being littered with things js needs to query for and access. That's the whole point of using something like vue? Put a function on the vue component that will make a request, keep all the data stuff in vue.

While I largely agree, that's not really true...

React for example wrecks your HTML with react related attributes on every DOM element.

There is nothing wrong with storing some information in the DOM.

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

#19
post #14

Earlier 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.

It looks like VueX supports async out of the box. That's a huge win IMO.

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

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

From my experience telling people this doesn't work as everyone thinks they are smart enough to avoid the trap. Like many companies going into China assuming things will be easy. Code ends up complex yet works because the complexity was successfully wrangled, missing the point of complexity reduction rather than wrangling.

Thematically, it may be a result of obsession over tools instead of product which occurs in other areas like photography, writing(hipster typewriters), and others. In tech, technology as lever supports a "hacker" mindset of getting 10 for 1. However this misses the point of hacking to get around your weaknesses in order to focus on your core competency which MUST intrinsically have value instead of being an empty shell.

The core competency for many client side developers is probably more rooted in a form of design than pure technical ability. Design, like music, writing, speaking, and art have incredibly low barriers to entry. This can create an arrogant mindset from people coming from more rigorous disciplines. Instead of focusing on the thing that must be done, they try to take shortcuts that only have the appearance of reaching the goal.

Post reply on HN