Welcome to VanillaJS Router Demo!
Use the navigation buttons above to test all features. This router demonstrates:
- UI-agnostic design - No DOM dependencies or assumptions
- Event-based architecture - Subscribe to router events for UI updates
- Hash-bang routing - URLs use
#!/
prefix - Parameter arrays - All params are consistently arrays
- Type coercion - Automatic stringβnumber/boolean conversion
- Async guards - Navigation can be cancelled or delayed
- Scroll restoration - Positions remembered between routes
- Anchor coexistence - Native
#section
links work alongside routing