How to create SPA | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to create SPA

How can i create spa without using any framework. Please no frameworks(like react or angular). Pure JS.

11th May 2021, 4:38 AM
Pranay Sehgal
Pranay Sehgal - avatar
1 Answer
+ 1
You could write a little application that does a lot of DOM manipulation without requiring other libraries or frameworks. It is reinventing the wheel but you could do it all yourself. If you're ok with using some third party libraries, you could follow this tutorial: https://www.sitepoint.com/single-page-app-without-framework/ If you want to make everything yourself, you can still read it but struggle to rewrite everything already solved by the libraries. I would keep things as simple and fundamental as possible to begin with and work up from there, though. If you try to rewrite something like a view-template engine to start with, you can easily get lost in the weeds and lose motivation before completing your goal. If you stay focused on just DOM manipulation, structuring your code quite well, and building a specific single page application, you'll more likely achieve your goal. DOM manipulation, event binding, and fetch are at the core of all you need.
11th May 2021, 11:14 PM
Josh Greig
Josh Greig - avatar