Live data from Hacker News

Nuxt.js over Vue.js: when should you use it and why

bornfight.com

61–70 of 80 posts

Re: Nuxt.js over Vue.js: when should you use it and why

#61
post #17
post #2

Warning that Nuxt.js is almost 100k out of the box, making it unsuitable for mobile usage.

It runs just fine for my site, across browsers and OSes.

You're probably getting down-ranked by Google, they use performance as a metric.

Re: Nuxt.js over Vue.js: when should you use it and why

#62

So the point is to improve SEO of Vue apps Perhaps useful to some sites. Assuming Google has issues with Vue. Not useful for someone doing content behind a sign-in that isn’t going to ever be SEOed anyway?

That's just one point. Nuxt is the best way to built a multi-page web app with Vue components. Once you're using vue-router and Vuex, you might as well use Nuxt.

Make sense. Currently using neither, but both are on my list to eval.

Re: Nuxt.js over Vue.js: when should you use it and why

#63

So the point is to improve SEO of Vue apps Perhaps useful to some sites. Assuming Google has issues with Vue. Not useful for someone doing content behind a sign-in that isn’t going to ever be SEOed anyway?

Well, about the not useful, I was working on a large service for lawyers and accountants behind a paywall, but then the new CEO decided we wanted to open up portions of stuff to google. So just because something isn't going to ever be SEOed anyway, doesn't mean that at some point in time, guess what, we need to SEO optimize some of this stuff!

This is literally a b2b platform. It wouldn't work to remove a paywall. But cool story.

Re: Nuxt.js over Vue.js: when should you use it and why

#64
post #9

this title and entire premise of the essay is the definition of false dichotomy. when you use nuxt.js you use vue.js. its very clear to webdevs what the metaframework does more than the framework, and you need both.

When starting a new project, I ask myself whether I want to use "vanilla" Vue.js or Nuxt.js.

They're two different kinds of projects, with different trade-offs, even though the underlying front end framework is the same.

Re: Nuxt.js over Vue.js: when should you use it and why

#65

Earlier quoted context omitted.

Does extendRoutes ( https://nuxtjs.org/api/configuration-router#extendroutes ) not work for y'all? I haven't had to use it (yet) but I was happy to see an escape hatch, though I could imagine it not scaling very well...

My understanding was that it just added to the existing generated list, I can’t work out how you’d tell it to ignore all your current pages and then manually write them all out?

you can use router-module if you want to do everything yourself (https://github.com/nuxt-community/router-module)

Re: Nuxt.js over Vue.js: when should you use it and why

#66
post #42

There are people over on reddit who say that EVERY project should use nuxt. from the lowly todo app, to huge erp projects... Yet, especially for ERP projects, most of those features are problematic. Like SEO. I don't want a search engine to ever see my content. In fact, my robots.txt says not to index it. SSR is a non starter, since everything would vary based on the user, we're just shifting the rendering back to th…

What is ERP?

Think SAP or Salesforce with a bunch of custom/addons. Sometimes account features are built in.

It's very much on a different scale of complexity than a todo app. Or any app that 'does one thing well'. I think a lot of devs forget this when talking about what everyone MUST do, or making recommendations like a form should never have more than 5 fields.

Re: Nuxt.js over Vue.js: when should you use it and why

#67

There are people over on reddit who say that EVERY project should use nuxt. from the lowly todo app, to huge erp projects... Yet, especially for ERP projects, most of those features are problematic. Like SEO. I don't want a search engine to ever see my content. In fact, my robots.txt says not to index it. SSR is a non starter, since everything would vary based on the user, we're just shifting the rendering back to th…

In an enterprise context, round trips (on the intranet) are cheap.

Agreed. Even across the internet, it's not bad.

Most of the ssr for performance is around how a couple extra milliseconds will increase your bounce rate. For some of us, if our users bounce, they get fired, because the site is the tool they use to do their job. (but we should always endeavour to be performant, because we don't want to make their job more miserable) So things like bounce rate doesn't matter.

Re: Nuxt.js over Vue.js: when should you use it and why

#68
post #58

Earlier quoted context omitted.

Out of interest, what are you using instead of Vue?

Svelte. It reduces the JavaScript sent to each page even further because it doesn't have a runtime per se. Basically each component is "compiled" to a set of imperative DOM instructions with some helper functions.

I wanted to like Svelte so bad, but the lack of tooling made it pretty hard to debug.

Hopefully they will get there one day but so far it gives me the feeling that I could hit a dead-end with it at any time.

Re: Nuxt.js over Vue.js: when should you use it and why

#69
post #59
post #26

Earlier quoted context omitted.

I'm trying to imagine what browser is so outdated that it struggles to parse 100kb of javascript

It's not the browser, it's the processor that's in most non-iPhones.

Samsung phones and Pixels aren’t that bad either. I am not saying it to be proud, but I tested our 3mb internal app with a 5 year old android phone, and worked.

The only time it was slow is if the browser itself was old (e.g. Chrome 44).

Re: Nuxt.js over Vue.js: when should you use it and why

#70
post #58

Earlier quoted context omitted.

Svelte. It reduces the JavaScript sent to each page even further because it doesn't have a runtime per se. Basically each component is "compiled" to a set of imperative DOM instructions with some helper functions.

I wanted to like Svelte so bad, but the lack of tooling made it pretty hard to debug. Hopefully they will get there one day but so far it gives me the feeling that I could hit a dead-end with it at any time.

It's not perfect but I'm willing to accept all its shortcomings because of everything I get in return.

Sometimes I hit a little bump on the road which would be faster/easier to solve in React/Vue/etc but even including those slowdowns I save so much net dev time it's crazy.

Post reply on HN