Liking cljdoc? Tell your friends :D

com.fulcrologic.rad.routing

A support layer for application-level routing. RAD supports the idea of an application-level history. This allows it to abstract over the concepts of relative navigation since it can be used on many platforms (like React Native or Electron) where no natural browser history API exists.

History support in RAD requires that you install an implementation of RouteHistory at application start time. See com.fulcrologic.rad.routing.history and associated namespaces.

Functions in this namespace that do relative routing will silently fail if no such history support is installed.

A support layer for application-level routing. RAD supports the idea of an *application-level* history. This
allows it to abstract over the concepts of relative navigation since it can be used
on many platforms (like React Native or Electron) where no natural browser history API exists.

History support in RAD requires that you install an implementation of RouteHistory at application start time. See
`com.fulcrologic.rad.routing.history` and associated namespaces.

Functions in this namespace that do relative routing will silently fail if no such history support is installed.
raw docstring

absolute-pathclj/s

(absolute-path app-ish RouteTarget route-params)

Get the absolute path for the given route target. NOTE: Using a route target in multiple paths of your application can lead to ambiguity and failure of general routing, since this will then return an unpredictable result.

Get the absolute path for the given route target. NOTE: Using a route target in multiple paths of your application
can lead to ambiguity and failure of general routing, since this will then return an unpredictable result.
sourceraw docstring

back!clj/s

(back! app-or-component)

Attempt to navigate back to the last point in history. Returns true if there is history support, false if it is impossible to even try to go back.

Attempt to navigate back to the last point in history. Returns true if there is history support, false if
it is impossible to even try to go back.
sourceraw docstring

route-to!clj/s

(route-to! app-or-component RouteTarget route-params)

Change the UI to display the route to the specified class, with the additional parameter map as route params. If route history is installed, then it will be notified of the change. This function is also integrated into the RAD authorization system.

You may include ::rad-routing/replace-route? true in route-params as a hint to the history that you'd prefer to replace the top history element instead of pushing a new one.

Change the UI to display the route to the specified class, with the additional parameter map as route params. If
route history is installed, then it will be notified of the change. This function is also integrated into the RAD
authorization system.

You may include `::rad-routing/replace-route? true` in route-params as a hint to the history that you'd prefer to
replace the top history element instead of pushing a new one.
sourceraw docstring

update-route-params!clj/s

(update-route-params! app-or-component f & args)

Like clojure.core/update. Has no effect if history support isn't installed.

Run (apply f current-route-params args) and store those as the current route params.

Like `clojure.core/update`. Has no effect if history support isn't installed.

Run `(apply f current-route-params args)` and store those as the current route params.
sourceraw docstring

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

× close