What is the algorithm for changing the template / page in a SPA in pure JS?
If you do it smartly, you will end up writing your own vue / react, only worse.
And on the stupid one: the content of the first page is
display: none, the content of the second is
display: block- it all lives at the same time, all connections and variables are preserved, pieces are hidden only visually.Anonymous
To place the code, please use CodePen or similar tool. Thanks you!