Docs don't include SPA syntax?

Hi team, big fan of VueJS

Just wondering why the site has JavaScript syntax instead of SPA syntax. What I mean, is that the syntax is from the perspective of using VueJS from a JS file and not a Vue file (having a javascript file with the CDN instead of a node project).

If this is included but I missed it, happy to know. Maybe there is a button or tab that can change it?

Reason I’m asking, is because I’m using Vue for a Uni project and it is difficult for my colleagues who are new to Vue. Also, when I first started learning Vue, it was tough.


1 Like

Agreed that this can be a bit confusing to new Vue users. My assumption is that the original goal (perhaps still a goal) was to gain adoption of Vue by way of enhancing parts of existing sites & applications. Since, unlike some “other frameworks”, Vue can play nicely in existing pages (and even with jQuery).
So, in this case it makes sense for most of the documentation to be around “self contained” Vue instances attached to an element/container.

The only place that I’ve seen the differentiation properly called out is under the Single File Components section, where it discusses “advanced javascript applications” / “…when your frontend is driven friendly by javascript” (i.e. SPA).

Perhaps a page in the first introduction section would be useful to go over the differences at a high level, especially for those new to compilation approaches (such as webpack when using the VueCLI).

1 Like

Hey Van, thanks for chiming in, I didn’t realise that a lot of Vue was used so much in the use cases you mentioned. Everyone that I know is using Vue with Node.

You’re right, a page of the docs would be very helpful. Also the option to see the entire site in both versions would be amazing. Hopefully this gets heard. I often find myself and others referring to the docs and getting code that doesn’t work.

1 Like

Yeah, its a clever way to get more adoption since development teams can add Vue here-and-there to enhance their existing legacy/monolithic applications. I know WordPress themes are also taking advantage of Vue as well, which is super cool.

The Vue docs are all available for contribution on GitHub; I’m not sure if the team would want someone rewriting the entire doc format, but perhaps a small contribution that is just providing those clarifications and a few examples to show the pattern, may be welcomed.

1 Like

Hey thanks for the tip, maybe I’ll make some suggestions.