# Vue js Why for SPA?

**URL:** <https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255>\
**Category:** General\
**Created:** [January 31, 2020, 11:20am UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255 "2020-01-31T11:20:18Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![optimistic](https://avatars.discourse-cdn.com/v4/letter/o/f6c823/32.png) [@optimistic](https://forum.freecodecamp.org/u/optimistic)\
**Post date:** [January 31, 2020, 11:20am UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/1 "2020-01-31T11:20:18Z")

</div>

Hello everyone

I have just started learning vuejs framework, but as I knew it is for SPA.  
Then why I learn a framework to design only one page? or am I wrong?

what if I want to create multipage websites without using javascript and jquery?  
should I go with vue? or there is alternatives?  
does react js enable me to create multiple page websites?  
or  
what should I do?  
and many thanks in advance.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 31, 2020, 11:23am UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/2 "2020-01-31T11:23:37Z")

</div>

you can do multiple page websites with just html, you just need multiple html files linked to each other in some way

what a framework like react or vue let you do is single page applications, as in, you have a single html page and everything is rendered dinamically based on user data and on what the user does

---

<div class="post-metadata">

**Author:** ![optimistic](https://avatars.discourse-cdn.com/v4/letter/o/f6c823/32.png) [@optimistic](https://forum.freecodecamp.org/u/optimistic)\
**Post date:** [January 31, 2020, 11:28am UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/3 "2020-01-31T11:28:46Z")

</div>

Thanks so much for the reply. but if I need specific feature that vue or react offer on another page than the main html. why they prevent us to do that?  
it is strange. even jquery can be used for multiple pages on the same website

---

<div class="post-metadata">

**Author:** ![pjonp](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pjonp/32/131704_2.png) [@pjonp](https://forum.freecodecamp.org/u/pjonp)\
**Post date:** [January 31, 2020, 11:33am UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/4 "2020-01-31T11:33:36Z")

</div>

jquery is um… old and no longer needed in my opinion.

React and Vue can manipulate the DOM on a single website.

What is your goal? Do you want a website,com/home | website,com/store ? or just a single website,com?

---

<div class="post-metadata">

**Author:** ![optimistic](https://avatars.discourse-cdn.com/v4/letter/o/f6c823/32.png) [@optimistic](https://forum.freecodecamp.org/u/optimistic)\
**Post date:** [January 31, 2020, 11:38am UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/5 "2020-01-31T11:38:02Z")

</div>

I need to develop website with many pages like about page, registeration page, etc. normal website that contains as many pages as I want  
may be a blog with artiles, posts, comments.  
may be online store.

---

<div class="post-metadata">

**Author:** ![pjonp](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pjonp/32/131704_2.png) [@pjonp](https://forum.freecodecamp.org/u/pjonp)\
**Post date:** [January 31, 2020, 11:41am UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/6 "2020-01-31T11:41:17Z")

</div>

Then you will need to look into back end. Like node.js or PHP.

Vue/React/JS are all front end. Your back end will tell which page to load.

\*and the back end will hide all of the private info (passwords etc)

---

<div class="post-metadata">

**Author:** ![optimistic](https://avatars.discourse-cdn.com/v4/letter/o/f6c823/32.png) [@optimistic](https://forum.freecodecamp.org/u/optimistic)\
**Post date:** [January 31, 2020, 11:47am UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/7 "2020-01-31T11:47:22Z")

</div>

thanks so much for the reply. I already have started learning PHP and began to understand backend but I mean the frontend.  
lets say I have the index.html where I use Vue js also I have aboutpage.html

then the problem that I used vue on the index page and unfortunately I can not use vue on the aboutpage because Vue is only for SPA.

Then what is the solution on that case?

---

<div class="post-metadata">

**Author:** ![pjonp](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pjonp/32/131704_2.png) [@pjonp](https://forum.freecodecamp.org/u/pjonp)\
**Post date:** [January 31, 2020, 12:04pm UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/8 "2020-01-31T12:04:20Z")

</div>

Each page is it’s own “Single Page Application”…

I’m honestly not sure with Vue… and someone else can answer this better;  
React uses a “router” system (that i’ve yet to play with) that allows you “route” between pages…

I’d assume Vue has a similar system. But hopefully someone with more experience can point you in the right direction

---

<div class="post-metadata">

**Author:** ![optimistic](https://avatars.discourse-cdn.com/v4/letter/o/f6c823/32.png) [@optimistic](https://forum.freecodecamp.org/u/optimistic)\
**Post date:** [January 31, 2020, 12:11pm UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/10 "2020-01-31T12:11:45Z")

</div>

thanks so much. I really do appreciate.

---

<div class="post-metadata">

**Author:** ![jjdevco](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@jjdevco](https://forum.freecodecamp.org/u/jjdevco)\
**Post date:** [January 31, 2020, 12:28pm UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/11 "2020-01-31T12:28:24Z")

</div>

Hi @pjonp @optimistic

@pjonp You are right, you can make every single page a single page application, that’s mean @optimistic if you want just the index.html and the about.html be interactive with Vue and left the others pages without, you can do it. You can use “Vuex” to manage the data between those page that are written with Vue, but I think it won’t be easy to share data with the pages that are not written with Vue.

Other option is, make a SPA using Vue to make the pages you want interactive, Vuex to manage the data and Vue Router to manage the URL’s that you serve, with Vue Router you can route to static pages (those that you want just with Html).

I recommend you to read about these Libraries and read about Vue Ecosystem.

---

<div class="post-metadata">

**Author:** ![optimistic](https://avatars.discourse-cdn.com/v4/letter/o/f6c823/32.png) [@optimistic](https://forum.freecodecamp.org/u/optimistic)\
**Post date:** [January 31, 2020, 12:34pm UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/12 "2020-01-31T12:34:17Z")

</div>

thanks so much. I really do appreciate. it was helpful. I know little about Vue router. I should read about vuex too. thank you

---

<div class="post-metadata">

**Author:** ![Clburguete](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Clburguete](https://forum.freecodecamp.org/u/Clburguete)\
**Post date:** [January 31, 2020, 9:14pm UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/13 "2020-01-31T21:14:25Z")

</div>

Hey! I think you have a little misunderstanding of what spa meando. Through vue router or react router or angular you just serve one main.html file. However, you can generate multiple routes/ pages that will be loaded through JS, which is what you want to do. Good luck with your project!

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 7:37pm UTC](https://forum.freecodecamp.org/t/vue-js-why-for-spa/346255/14 "2021-06-01T19:37:10Z")

</div>


