Fork me on GitHub
#reitit
<
2019-06-10
>
ikitommi08:06:10

the default will be both, e.g. #{:bracket :colon}, until 1.0.0 at least.

stefan19:06:50

any recommendations/examples on redirecting when a user tries to visit an invalid route, using reitit.frontend?

valtteri06:06:18

Hi @U9MJTSS9K! In frontend-links example you can achieve this simply doing this:

(if @current-match
     (let [view (:view (:data @current-match))]
       [view @current-match])
     [Redirect {:to ::frontpage}])
Hope this helps you.

stefan19:06:05

I’ve tried

(if current-route [app-stuff] [Redirect])
but since I initialize current-route to nil, I get redirected even for valid routes

stefan19:06:14

I’m using Redirect as defined here:

alice19:06:13

Hey guys, are there any example CRUD type apps that use reitit I can read? Looking for examples