Live data from Hacker News

How we do Vue at GitLab: one year later

about.gitlab.com

171–180 of 208 posts

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

#171
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 ecosy…

I started off hating the idea of single page components; I'd have much rather had a component reside within a directory (with template.html, style.sass and script.es6.js files or whatever) but in reality, so long as you keep your templates light and do any heavy lifting elsewhere, it's quite manageable.

Newer JavaScript functionality makes that work nicely.

Almost all of my components fit on one screen.

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

#172
I love me some Vue. VueX is actually quite simple, especially compared to Redux. It doesn’t try to invent too much new terminology.

I did end up needing to reach for jQuery in two situations with Vue. First was to auto focus form inputs when the form becomes visible. For the life of me could not find a good way to do this with Vue. Second was when a particular architecture of the app required using lots of modals. Vue just doesn’t do well with components that live inside modals and need to be reset whenever a modal is opened or closed. Basic CRUD using Bootstrap modals is a huge pain, especially the Update mode. I ended up creating rather gross hacks for notifying the component in the modal that it needs to be reset.

One of the coolest things I did with Vue/VueX is having updates about server side events delivered via WebSockets. A single generic connection to the server pushes CUD events about all the relevant models to the client, where VueX duetifully executes the ADD/UPDATE/REMOVE actions for instant updates to all parts of the app.

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

#173
post #147

Earlier quoted context omitted.

React made me feel that the designers of react are stupid - so kind of a similar experience :)

Whats with the insults? I can get preferring one platform over another, but insulting people is just lame. The React and Redux developers are incredibly good at what they do - they've also spent a lot of time putting out material, books, video courses, blog posts, talks help everybody else understand the new paradigm they've created They can't be that stupid when a lot of modern javascript framework components are ei…

> They can't be that stupid when a lot of modern javascript framework components are either direct clones of, or influenced by, their work

The JS ecosystem is like the baskin robbins of st. Which is mind-blowing because JS has gotten so much better and browsers have gotten so much better in the past 10 years. Yet the apps people are creating today are worse that the st people were creating with IE8 and jQuery.

I am hardly the only one who has recognized this as a problem. I see an article from a major dev on the same topic on a regular basis here.

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

#174

This is one of the most aggressive, defensive, and religious comments thread list I've ever seen in a highly rated HN post. Not sure what to take from that.

Javascript libraries and their preferences are always a high tension discussion because at the end of the day, it often comes down to whether you made the right decision for years to come.

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

#175

So I've used Vue for personal projects before, it's really nice. I lead the dev on a small team within a large corporate company, we focus on React & Angular(io). The primary reason why I would not adopt Vue is because Vue is still driven by Evan You - which is great, but if something had to happen to the guy (and I hope nothing does), I'm unsure Vue would have the long term support & drive it does right now.

While Evan is currently the main force behind Vue, there are many large companies with stake in it, as well as a reasonable number of contributors. Personally I prefer the current state of operations over the dense bureaucracy surrounding some other libraries, but you’re obviously free to disagree.

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

#176
post #84

Earlier quoted context omitted.

Interesting critique. I would highly suggest checking out template literals: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... Yeah styled.div is a function as you can check out in the mdn docs I linked, it's really cool stuff. Inheritance is done like: const List = styled.ul` li { padding: 10px; } ` const HeavyPaddedList = styled(List)` li { padding: 20px; } ` If you wanted to just change the li you'd…

> You're writing scss within the text blocks. So, yeah, you lose all the syntax highlighting etc. that comes with just writing normal CSS. I don't think it's unreasonable for a designer to object to that - how would you feel if you were presented with a build system that required you to write all your JavaScript inside one big string statement? Maybe it's just me, but I don't find it intuitive at all. `styled` has pr…

I would argue that the right boundary for designers to be working with front-end people is via central company style assets, and not at the component level where ad-hoc styles should be stored.

It seems a little odd that the front-end designer, who is in our hypothetical not comfortable enough to actually work on component themselves, would be brought in to tag-team with someone else who also doesn't feel comfortable enough to do the work themselves.

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

#177
I'm very happy the React and Vue projects are headed by people like Evan You and Dan Abramov, not HN commenters. The hostility in these threads is upsetting. There is no best approach and both React and Vue have their worth, if you like them or not.

Every time I see a topic about Vue or React (or practically anything JS related) I see the polar opposite of the disarming friendliness coming from the community leaders on Twitter.

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

#178
post #170

I wanted to build something in Vue a few months ago. I really like the single-file-component thing. I also like the code to update automatically and my browser to refresh. I decided on Webpack. First time using it and no idea where to get started. I ended up downloading some boilerplate webpack / vue / vueX that now does everything for me, but I have no idea what webpack is actually doing or how it is doing that. I'm…

I'm actually writing about this right now. I've worked with a lot of teams that have kicked off big, production-grade applications with boilerplates like Create-React-App. Your intuition is right: they get to prod having no idea how their buildchain works, and once something goes wrong they're stuck.

You really don't want your first time reasoning about your build process to be some kind of deployment disaster or production bug. And that's exactly what these tools are selling you.

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

#179
post #115

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

Code like parent comment is why I use Intercooler.js [1]. [1] http://intercoolerjs.org

It is a good example for solving problems without overengineering them.

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

#180
post #5

Earlier quoted context omitted.

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…

There is a big problem with the commercialisation of React. More and more companies are using learning resources as marketing material. And now one popular JS developer has started beginning his GitHub readmes with advertisements for a paid JS course. It's a far cry from the open, guileless sharing culture of webdev 10 years ago.
Post reply on HN