Liking cljdoc? Tell your friends :D

Configuring Routers

Routers can be configured via options. The following options are available for the reitit.core/router:

keydescription
:pathBase-path for routes
:routesInitial resolved routes (default [])
:dataInitial route data (default {})
:specclojure.spec definition for a route data, see reitit.spec on how to use this
:expandFunction of arg opts => data to expand route arg to route data (default reitit.core/expand)
:coerceFunction of route opts => route to coerce resolved route, can throw or return nil
:compileFunction of route opts => result to compile a route handler
:validateFunction of routes opts => () to validate route (data) via side-effects
:conflictsFunction of {route #{route}} => () to handle conflicting routes (default reitit.core/throw-on-conflicts!)
:routerFunction of routes opts => router to override the actual router implementation

Can you improve this documentation?Edit on GitHub

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

× close