Liking cljdoc? Tell your friends :D

metosin.ui.routing


AdditionalDatacljs

source

datacljs

(data x)

Merges additional data into route data.

Useful for:

  • marking if the route is private or public
  • marking what menu item should be active
Merges additional data into route data.

Useful for:
- marking if the route is private or public
- marking what menu item should be active
sourceraw docstring

hook!cljs

(hook! routes cursor route-change)

Adds onhashchange hook and calls update-route logic when hash change event happens.

Update-route will call given route-change function. route-change should return a new route data or a channel which will contain new route data in future. Channel can return multiple route data maps. This can be used to delay route-change until e.g. data is loaded.

FIXME: Using cursor/atom is stupid. Update-route will set the new route data to given cursor using reset!.

Adds `onhashchange` hook and calls update-route logic when hash change event happens.

Update-route will call given `route-change` function. `route-change` should return a
new route data or a channel which will contain new route data in future. Channel
can return multiple route data maps. This can be used to delay route-change
until e.g. data is loaded.

FIXME: Using cursor/atom is stupid.
Update-route will set the new route data to given cursor using `reset!`.
sourceraw docstring

hrefcljs

(href routes k & [params])
source

update-uri!cljs

(update-uri! routes k & [params])

Warning: this triggers dispatch!

Warning: this triggers dispatch!
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close