@koy/router

0.1.12 • Public • Published

@koy/router

A router for browser routing.

I just define this library as simple as i can for that you can use some js packages you'd like.

Link

I export a Link module that you can use it as HTML a tags.

for example:

const HomeLink = Link({href: '/home'}, 'Home')

iBack, iForward, iGo, iReplace, iPush

All of them just the simple rewrite for corresponding history's function and wrapped it as IO(can cause onUrlChange in architecture's application).

for example:

const HomeLinkP = Element.of(
  'p', {
    onclick: () => dispatch(ap(iPush, of(IO, '/home')))
  },
  Element.of('span', 'Home')
)

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @koy/router

      Weekly Downloads

      0

      Version

      0.1.12

      License

      MIT

      Unpacked Size

      6.7 kB

      Total Files

      4

      Last publish

      Collaborators

      • murakamikennzo