DEV Community

Discussion on: Build a custom SPA Router using VanillaJS

Collapse
 
akhilarjun profile image
Akhil Arjun

I loved the article for two reasons

  1. You have a good way of explaining topics
  2. Even I meddled with the same idea three years ago and build RouteNow. Primarily for learning how it all works and then continued building it coz it saved me from boilerplate solutions out there lot of which is bloated

    GitHub logo akhilarjun / RouteNow

    RouteNow is a small fast library ⚡ that will help you in developing a SinglePage Application without any dependencies like jQuery, AngularJs, vue.js or any of those bulky frameworks.

    RouteNow

    Contributions-Welcome experimental File-Size Version

    A new revolutionary small router with no bullshit!

    RouteNow is a small library that will help you in developing a SinglePage Application without any dependencies like jQuery, AngularJs, vue.js or any of those bulky frameworks.

    Installation

    Installating RouteNow.js is as easy as it gets.

    Add the script to the end of your body

    <script src="../pathto/route-now.js"></script>

    Or use the CDN link

    
    <script src="https://cdn.jsdelivr.net/gh/akhilarjun/RouteNow@latest/js/route-now.js"></script>
    <!-- For specific version use the version tag -->
    <script src="https://cdn.jsdelivr.net/gh/akhilarjun/RouteNow@v2.0.1/js/route-now.js"></script>
    <!-- For Minified -->
    <script src="https://cdn.jsdelivr.net/gh/akhilarjun/RouteNow@v2.0.1/js/route-now.min.js"></script>

    Use anchor tags with r-href property to point to your paths

    <a r-href="home">Home</a>

    Now add the Router outlet where the views should…

Collapse
 
skaytech profile image
skaytech

Thanks Akhil! I'll checkout your repo. Thanks for sharing. I generally don't believe in reinventing the wheel. However, for personal projects it'll be a good idea to play around with the toolset of our choice.