8000 GitHub - joaomilho/zen-router: ☯ The simplest router possible
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

joaomilho/zen-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zen-router

The simplest router possible

Usage

es5
var router = require('zen-router')

function yourRenderFunction (currentRoute) {
  switch(currentRoute) {
    case 'home':
      ...
    case 'faq':
      ...
    default:
      ...
  }
}

router(yourRenderFunction)
es6
import router from 'zen-router'

const yourRenderFunction = (currentRoute) => {
  switch(currentRoute) {
    case 'home':
      ...
    case 'faq':
      ...
    default:
      ...
  }
}

router(yourRenderFunction)

About

☯ The simplest router possible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0