This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-04
Channels
- # architecture (9)
- # babashka (33)
- # beginners (53)
- # biff (3)
- # cljdoc (11)
- # clojure (8)
- # clojure-austria (2)
- # clojure-dev (9)
- # clojure-europe (64)
- # clojure-nl (2)
- # clojure-norway (49)
- # clojure-sweden (4)
- # clojure-uk (4)
- # clojurescript (16)
- # cursive (14)
- # datahike (31)
- # datalevin (6)
- # datascript (9)
- # events (1)
- # fulcro (4)
- # honeysql (8)
- # hyperfiddle (116)
- # introduce-yourself (1)
- # kaocha (2)
- # malli (13)
- # nyc (2)
- # off-topic (4)
- # polylith (5)
- # portal (1)
- # reagent (1)
- # reitit (18)
- # releases (1)
- # spacemacs (6)
Hello all, I have a dynamic routing question that I am having issues with. I want to be able to pass in a route into the browsers address bar and show the component for that route. I am able to use (change-route!) just fine to go to different components but I cannot use a URI to view a specific component. Ive tried following along with the fulcro books dynamic routing section but no matter how many times I go over it I cannot seem to find the issue. Here is the code I am working with https://paste.debian.net/1290931/ And on a different note is this error normal to see in the console when working with dynamic routing?
taoensso.timbre.appenders.core.js:158 2023-08-27T20:17:00.051Z ERROR [com.fulcrologic.fulcro.components:782] - Props passed to votann.client/Main are of the type cljs.core/PersistentVector instead of a map. Perhaps you meant to `map` the component over the props? See
Appreciate any help, fulcro is amazing and allowing client side routing is the missing piece for me.The thing to understand is that dynamic routing (DR) is more about UI and query manipulation. React native works on the desktop, and in mobile. These don’t have “URLs”, so there is no direct dependency around URLs built into DR. DR is designed to be compatible with the ideas in URL history, but you have to make the integration (using the browser’s history API, possibly using a clj library like pushy). The RAD system has such a plugin, and you can read the source there for some ideas of how you can do it, or you can just use those RAD primitives (rad/routing and rad/html5-history).
Appreciate the response. I mainly want to use fulcro in the browser and not being able to use the browser back or forward buttons was a little weird and might change the user experience so I was going to use traditional url routing to be able to preserve history or go directly to a specific "page" I will look into pushy and rad/routing Thanks for clarifying this with more background.
As Tony said. And no, you should not be getting that error normally. Perhaps give https://github.com/holyjak/fulcro-troubleshooting a try?