This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-29
Channels
- # announcements (4)
- # babashka (66)
- # beginners (7)
- # cljs-dev (6)
- # clojure (12)
- # clojure-europe (28)
- # clojure-nl (1)
- # clojure-norway (75)
- # clojure-uk (16)
- # clojuredesign-podcast (1)
- # clojurescript (16)
- # datascript (6)
- # deps-new (2)
- # dev-tooling (40)
- # exercism (1)
- # fulcro (92)
- # hyperfiddle (25)
- # lsp (19)
- # malli (1)
- # meander (2)
- # nrepl (9)
- # off-topic (5)
- # pathom (1)
- # practicalli (1)
- # re-frame (20)
- # reitit (14)
- # releases (1)
- # sci (86)
- # shadow-cljs (216)
- # sql (13)
- # testing (4)
- # tools-deps (4)
- # vscode (3)
How do you use the update-paths option of the reitit router? Can you use that it to preprocess / expand route data? If you set this value do you need to make sure you keep the default behaviour that calls impl/accumulate?
Yes, you can do all sort of preprocessing with it. You should add your own rules to the default rules - if you find them usefull (e.g. use any coercion)
What is the rule that propagates information from higher levels to lower levels. e.g. if I have a route [“top-level” {:some-key true} [“/next-level” {:more :info}]] at what point does some-key make it into the next-level
Ideally I’d place a function after this is done, so I can use this info and expand on it.
Here's a short description of the full route expansion : there are several hooks available to change things: https://cljdoc.org/d/metosin/reitit/0.7.0-alpha5/doc/basics/router#behind-the-scenes
I think :compile
is the one you are looking for. If you use ring, you should compose your code with the reitit-ring default compile. See source code for more info. And please share how and what you did
I used it for a whole bunch of things, one example was to merge in responses for the open api docs. e.g. 400 - incorrect and 500 - error responses, and if :allow-unauthenticated?
key on the route is false, 401 - unauthorized and 403 - forbidden.
Hello did someone knows how i can instantiate the reitit.frontend.easy/router with React 18 ? we have ReactDOM.render
method flagged as obsolete.
I saw this example from reitit repository but it manage the render method from react 17. https://github.com/metosin/reitit/blob/master/examples/frontend-re-frame/src/cljs/frontend_re_frame/core.cljs
@UTFAPNRPT is it your project with lein-figwheel or shadows-cljs? bc i have the hotreload code feature working with shadow.
For me hot-reload works with shadow-cljs, but sometimes I have to refresh a browser page manually. I assume it's due to defonce
.
@U1ZJ06MMK my project is shadow. I did some searching here in clojurians and it seems like others have experienced the issue as well. @U01320BR6US I have to refresh the page every time. That’s just not tenable. For now I’m back on 17.