This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-21
Channels
- # aleph (2)
- # announcements (2)
- # babashka (10)
- # beginners (117)
- # calva (11)
- # cider (19)
- # clj-kondo (27)
- # cljs-dev (24)
- # cljsjs (1)
- # clojure (73)
- # clojure-europe (3)
- # clojure-italy (2)
- # clojure-nl (47)
- # clojure-spec (23)
- # clojure-uk (28)
- # clojurescript (71)
- # cursive (7)
- # data-science (17)
- # datascript (1)
- # datomic (7)
- # duct (23)
- # emacs (23)
- # fulcro (6)
- # graalvm (41)
- # jobs (2)
- # luminus (1)
- # malli (1)
- # off-topic (151)
- # pathom (1)
- # portkey (10)
- # re-frame (12)
- # reitit (17)
- # shadow-cljs (158)
- # spacemacs (14)
- # sql (8)
- # tools-deps (17)
- # xtdb (9)
Is there an example online of using reitit with frontend easy and reframe. Like as a project?
I’ve gone through the learn re-frame course and I’m having a little bit of trouble grokking the changes with using reitit
Likewise I’m also interested in the controllers and how that looks on a larger project than a sample file
The basic recipe how I’ve used reitit
with re-frame
is to
• provide to reitit.frontend.easy/start!
a dispatch fn, on-navigate
, that swaps the new matching route to app-db
when route changes. Route controllers are part of route data and they are applied during this dispatch.
• add a key (e.g., :view
) to route data, that has a value of the actual rendered view fn (reagent component)
• make subscription to active route in app-db
and pull out the :view
to render
• make a re-frame event and effect which performs the navigation when the event is dispatched
Currently writing a tutorial on reitit
. Use with re-frame
could be an “advanced” topic there.

there is also the minimalistic https://github.com/metosin/reitit/tree/master/examples/frontend-re-frame
This seems to have all the bits and pieces from above, incl. controllers
This is super helpful. Thanks!
Can someone explain how the path conflicts work? https://cljdoc.org/d/metosin/reitit-frontend/0.3.10/doc/basics/route-conflicts#path-conflicts How are these conflicting?
@grounded_sage If you route for /bulk/orders
, it would match multiple routes.
Oh yep I can see that now
I think I was confused by the errows
; /:user-id/orders
; -> /public/*path
; -> /bulk/:bulk-id
Which looks like it is saying those are the conflicting paths
In my code this conflicted. Which made me look at the docs. I'm not sure how that can conflict with the paths.
["projects"]
["project/:id"]
@grounded_sage those are not conflicting, unless there is a wildcard route which conflicts those both. But you can always disable the conflict resolution, it's just a shout-out about weird stuff, many times valid because of legacy reasons