This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-25
Channels
- # anglican (2)
- # babashka (53)
- # beginners (99)
- # brompton (1)
- # calva (28)
- # circleci (43)
- # clj-commons (4)
- # clj-kondo (176)
- # cljsrn (22)
- # clojars (7)
- # clojure (175)
- # clojure-australia (2)
- # clojure-europe (20)
- # clojure-germany (1)
- # clojure-uk (5)
- # clojurescript (195)
- # cursive (18)
- # datomic (13)
- # emacs (2)
- # farolero (9)
- # find-my-lib (6)
- # fulcro (8)
- # graalvm (12)
- # gratitude (5)
- # helix (11)
- # improve-getting-started (36)
- # introduce-yourself (3)
- # jackdaw (21)
- # jobs (2)
- # joker (2)
- # malli (65)
- # meander (24)
- # nbb (2)
- # off-topic (4)
- # pathom (2)
- # polylith (17)
- # portal (5)
- # react (3)
- # reagent (22)
- # releases (1)
- # ring (4)
- # shadow-cljs (79)
- # show-and-tell (2)
- # testing (5)
- # tools-deps (9)
- # xtdb (12)
👋 I’m building a fullstack webapp in clojure for the first time, without much prior experience doing this at all. I’m using http://htmx.org to avoid writing frontend JS (if you’re unfamiliar, it’s just rendering everything server-side and swapping only certain divs instead of fullpage refresh). For some use-cases I need to know what the user is seeing e.g. “press button to go to next item” -> I need to know where the user is and what’s next. I think this is usually done with sessions, but I’m not sure in practice how to keep track of this and more complicated things like cacheing full hiccup objects. My understanding is that it’s possible to use the ring cookie from the session middleware and then reply to the client with the information I want to keep track. This sounds ok for some data points, but full page status is too much no? I also read about using redis to keep the session, but don’t I still have to send the whole state to the client every time? I felt the ring-sessions docs is a bit thin for beginners like me 😬
I may have misunderstood but it seems to me that where the user is and what’s next could be represented by the url, no?
where the user is yes, but I’m not seeing how to do what’s next in the url. For context there’s the possibility that “what’s next” is composed of 100+ uuids. Isn’t that too much? I think I have found a good solution totally bypassing sessions though 🙂 using htmx I can just create a button with the url pointing at the next/previous item to the current one, because the server always knows what is available. A bit hard to explain in pure english. Nonetheless, I’m still interested in answering this question about sending data to the client with every request