This project is in early stage...
Demo http://repo.respo.site/router/
[respo/router "0.2.2"]
[respo-router.util.listener :refer [listen! parse-address]]
[respo-router.core :refer [render-url!]]
; router rules
(def dict
{"home" [], "room" ["room-id"], "team" ["team-id"], "search" []})
; :hash | :history
(def mode :history)
; listen to router and dispatch actions
(listen! dict dispatch! mode)
; /a/b?c=d
(parse-address address dict)
; render url
(add-watch store-ref :changes
(fn [] (render-url! (:router @store-ref) dict mode)))
Special routes
404
yarn watch
# another terminal
yarn dev
# open http://localhost:8080
https://github.com/mvc-works/coworkflow
yarn compile-test
node target/test.js
MIT
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close