News for hackers. Stuff that matters.
Re:Vue.js vs. React: what happened in 2017 by wjossey on Sunday December 24, 2017 @12:54PM (#16000466)
I’m the founder writing code (but not the only technical person) for my three person startup. In October I started migrating our MVP from server side templates to Vue, given we had direction and traction on a product line that justified the time investment. It’s turned out to be a great decision (although likely one that could have been made with react as the choice as well).

My “success story” is how Vue helped me to massively improve our user experience in low bandwidth or high latency environments. Our startup is trying to reinvent the ways that companies approach their review process, and one of the things we do is run a workshop on delivering actionable feedback during the review cycle. We have users log into our app during the workshop, and this often happens in conference rooms over congested WiFi. Our MVP used turbolinks, so it felt generally “snappy” during normal use, but could feel sluggish if moderate latency was introduced (such as a congested router).

Since I completed the rewrite to Vue (which took only about two weeks because of how simple it was to pick up, even for a non frontend person like myself), we’ve had multiple launches that both would have likely bombed had we not done the work to move to something less dependent on a tradition client -> server -> client response cycle to render the next “page”.

Either way, I’ve become an advocate for vue. I love single file components, love the documentation, and am very happy with the community libraries. All in all, I’m very bullish for Vue in 2018 as a happy new users.

Re:Vue.js vs. React: what happened in 2017 by jetter on Sunday December 24, 2017 @01:32PM (#16000623)
I agree. We still admire Vue.js after using it for more than a year and writing hundreds of lines of Vue.js code every day. No chance I would choose React+Redux in cases when I know I need quick progress on my web project - Vue.js allows you to be very productive, cutting corners in the right places, while still keeping the reasonable code quality, and writing very little of boilerplate.
Re:Vue.js vs. React: what happened in 2017 by spion on Sunday December 24, 2017 @02:37PM (#16000950)
MobX+React would be just like Vue, but with the benefits of the larger React ecosystem and full type checking with typescript/flow, and the drawback of mandatory build tooling.
Re:Vue.js vs. React: what happened in 2017 by jetter on Sunday December 24, 2017 @03:28PM (#16001177)
It is similar, but it will mean you get off the highway of React "preferred way" - for example, in case you start working with React Native you might have an issue of using different state management solutions for your web and mobile stack - it looks like nobody is using Mobx with RN in serious projects.
Re:Vue.js vs. React: what happened in 2017 by tmail21 on Sunday December 24, 2017 @04:29PM (#16001380)
Actually we use React+mobx on both our web and RN stacks and it's been great. What we really like is that it is simple and extremely performant since in most cases it automatically updates only the React components that need to be re-rendered based on the state that's been modified.

We jumped directly from a flux-like state management to mobx (skipping Redux) and the development time has gone down significantly as well.

Re:Vue.js vs. React: what happened in 2017 by jetter on Monday December 25, 2017 @01:31AM (#16003010)
Cool! I think you guys should do a writeup since "react native mobx" results in google clearly state the mind share is not there yet.
Re:Vue.js vs. React: what happened in 2017 by kenning on Sunday December 24, 2017 @07:01PM (#16001931)
Chiming in with another "we use mobx and react native." Sorry for the overload of comments like this but I think it's perfectly fine.
Re:Vue.js vs. React: what happened in 2017 by hesarenu on Sunday December 24, 2017 @10:45PM (#16002531)
There is no react preferred way of state management. I have used mobx in many of my reactjs native projects.
Re:Vue.js vs. React: what happened in 2017 by eropple on Sunday December 24, 2017 @03:30PM (#16001184)
I've used MobX for React Native (though I went back to Redux for familiarity). I found it to be transparent enough.
Re:Vue.js vs. React: what happened in 2017 by m_ke on Sunday December 24, 2017 @03:46PM (#16001237)
We're using RN with mobx and it has been great. We'd probably have 3x more code if we went with redux.
Re:Vue.js vs. React: what happened in 2017 by jrochkind1 on Sunday December 24, 2017 @02:50PM (#16001014)
i've been wondering about that too, and would love to see some write-ups of people that have react+mobx for at least a few months if not more, how it worked out for them, plusses and minuses.

Also tutorials for react+mobx.

Re:Vue.js vs. React: what happened in 2017 by j45 on Sunday December 24, 2017 @01:29PM (#16000607)
Appreciate the comment about high and low bandwidth performance by vue. 80% of the world is low bandwidth and such solutions built with such tools have an opportunity to have a much farther reach.

Have you had any exposure to using vue as a progressive web app that can sync and work offline first?

Have you come across any vue.js offline app experiences?

Re:Vue.js vs. React: what happened in 2017 by wjossey on Sunday December 24, 2017 @03:09PM (#16001099)
I've looked at PWA & working with offline, but it's an optimization I'd like to have, not one that we absolutely need. Right now, given how crunched we are for resources, everything I work on has to fall into the category of "absolutely need", otherwise I de-prioritize it.

For us, the reason why we don't necessarily "need" PWA or full offline is that we do have an initial online component that is dynamic, so fully supporting an offline mode (a la, full on iOS or Android app) would change a lot of assumptions & optimizations we've made with how our product works. PWA seems promising, but it still feels slightly early to me. It's not that I don't think it will eventually win, but right now it has just enough complexity with minimal payoff, that I've punted for now (although it's probably closest to what we're looking for).

Re:Vue.js vs. React: what happened in 2017 by j45 on Monday December 25, 2017 @11:54AM (#16004776)
Appreciate your detailed reply. I'm working on a problem with mobile, offline first as a key part of the solution and have been leaning towards vue if for nothing else it's appearing simplicity, flexibility, and ability for new devs to get up to speed on the project quicker.

The current incarnation / wave / interpretation of PWA still seems to be maturing. The js layer definitely brings its challenges and rewards, while browser innovation and evolution continues to better support PWA.

Still.. A bit of this PWA stuff makes me feel like we're going through a cycle from the past.

Syncing ones data and being offline for the majority of time to work on a mobile laptop or pda was normal with dialup, prior to wifi. Tools like Lotus Notes apps ran and synced data for offline use reasonably well including handling conflicts (while not so good at other things).

Offline first syncing is still largely a need inucrative remote industrial operations today and for the majority of countries in the world whom have much less bandwidth access, I'm glad PWA is emerging as a tool along with WebAssembly.

I found a few projects using vue and PWA and will try some things out - want to avoid any assumptions of adding PWA later as it's a key to my problem set.

Re:Vue.js vs. React: what happened in 2017 by mercer on Wednesday December 27, 2017 @07:29AM (#16014365)
I'm assuming you used Rails as a back-end?

The reason I'm asking is that I've been diving into Elixir and Phoenix, and I'm wondering if the difference in speed between those two would obviate the 'need' for React/Vue (or even be a faster solution). I'm a front-end dude, so no 'enemy' of those, but I keep finding myself preferring an Elixir-based (and thus server-side) solution because it's just such a nice language and so convenient to not have to switch for significant logic.

For example, the fact that {} in js is a map/object, where in Elixir it is a tuple (a map would be %{}) keeps tripping me up, and it makes me generally either lean toward mostly server-side with some basic js snippets (Turbolinks style), or alternatively mostly client-side (React/Redux) with a 'dump' api backend in Elixir.

At this point I'd really love to lean toward the server-side, but stories like yours make me wonder about that leaning.

Re:Vue.js vs. React: what happened in 2017 by platz on Sunday December 24, 2017 @01:30PM (#16000613)
What is a turbolink?
Re:Vue.js vs. React: what happened in 2017 by wjossey on Sunday December 24, 2017 @03:14PM (#16001119)
Yes, sorry for just tossing this one in there. Our product is build on top of rails 5.x, and rails has support for turbolinks. They make your server-side rendered application 'Feel' more SPA, by only refreshing the parts of the page that have actually changed upon server response.

It still requires a massive payload to be sent across the wire, as well as a full render on the server, so it's not the "king of efficiency", but it definitely improves the end user experience in many ways.

In my case, I wanted an even snappier experience, where a user clicking on a button would trigger an immediate transition, with the "saving" happening behind the scenes. Before, on a slow or bogged down connection, you could see page transitions take second(s), which felt like an eternity when you had to go through our 50+ screens during our workshop. Now, with heavier backgrounding, those transitions are instantaneous, and the end-user doesn't need to wait but a millisecond (draw time) for the next page.

Re:Vue.js vs. React: what happened in 2017 by shostack on Sunday December 24, 2017 @09:44PM (#16002356)
When would you recommend using turbo links over Vue? Or, conversely, would you recommend people not even bother with turbolinks?

I'm learning Rails and haven't gotten to that stuff yet, but I'm wondering whether I should even waste my time learning them if something like Vue is just superior and just as easy to implement.

Re:Vue.js vs. React: what happened in 2017 by pqdbr on Sunday December 24, 2017 @10:41PM (#16002520)
You can have both at the same time. If you want to build a SPA, go for Vue only. Build if you want to have a more traditional application and only use Vue for some views, it will work with turbolinks, you just have to use a gem to help you with the caching (turbolinks cachês the body tag to speed up the back button, and the gem clears the Vue app before the caching happens making it idempotent).

Turbolinks is amazing.

Re:Vue.js vs. React: what happened in 2017 by skybrian on Sunday December 24, 2017 @01:41PM (#16000684)
Haven't used it, but it seems to avoid a full page reload but still does a round trip:

https://github.com/turbolinks/turbolinks

Re:Vue.js vs. React: what happened in 2017 by randallsquared on Sunday December 24, 2017 @01:37PM (#16000659)
Re:Vue.js vs. React: what happened in 2017 by moonlighter on Sunday December 24, 2017 @03:00PM (#16001061)