@koy/router
v0.1.12
Published
A router for browser routing.
Downloads
107
Readme
@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')
)