b-rad-c / vanjs-spa-template

A Van.js SPA template with routing and history

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🚨 This is deprecated, see this example which uses a reusable VanJS SPA framework created from this repository. 🚨

Van.js SPA Template

A VanJS powered demo SPA, 3.38kB bundled and gzipped!

Features

  • Navigation powered by custom router with async loading
  • router integrates with browser history
  • state object integrates with browser history
  • user profile page with user id parsed from url params
  • user list sorted with url query params
  • navLink component for generating links based off of named routes, with url and query params and active class css styling
  • handler for user id not found
  • not found page

Instructions

install

npm install

develop

npm run dev

build

npm run build

build visualizer

npm run bundle-visualizer

Credit

router based on minimal router (no longer maintained)

spa app based on this example app from @ndrean

About

A Van.js SPA template with routing and history


Languages

Language:JavaScript 90.1%Language:CSS 6.7%Language:HTML 3.2%