This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-14
Channels
- # announcements (13)
- # aws (2)
- # babashka (17)
- # beginners (80)
- # biff (10)
- # cljs-dev (51)
- # cljsrn (6)
- # clojure (42)
- # clojure-australia (9)
- # clojure-boston (2)
- # clojure-europe (17)
- # clojure-sweden (3)
- # clojure-uk (53)
- # clojurescript (44)
- # code-reviews (2)
- # core-async (5)
- # cryogen (3)
- # cursive (32)
- # datahike (1)
- # datomic (11)
- # events (1)
- # fulcro (22)
- # helix (3)
- # honeysql (3)
- # leiningen (4)
- # lsp (30)
- # luminus (13)
- # malli (5)
- # off-topic (115)
- # other-languages (5)
- # pathom (10)
- # polylith (23)
- # re-frame (24)
- # reagent (10)
- # releases (2)
- # shadow-cljs (124)
Anybody got a complete example with Luminus on cookie handling? This is the last step to be able to publish my first Clojure app and I am missing something. Thanks.
I don't have an example but if you have a specific question then I might be able to help
Yes, ... background of what I'm doing:
I just want to have the user pick a level and represent that in the code ... I have the actions set up correctly, but getting the information in is my question:
(1) Better to use a cookie or an atom?
(2) If a cookie: what's the syntax in Luminus for:
(a) setting a cookie
(b) getting a cookie value back to use in the code
Thanks much for any suggestions!
Hey @U01H6546F4Y, I've added a couple of routes and handlers to demonstrate setting and retrieving a cookie: https://github.com/jtlocsei/hello-world-web-app/commit/d7afdb420d2765ca97d6befe831bf454ca581c5b
You probably already know this but you can inspect cookies in Chrome to see what's going on while you're debugging: https://developer.chrome.com/docs/devtools/storage/cookies/
Live demo: https://guessing-game.mircloud.us/math/choose-level A cookie is used to store chosen difficulty level, and the question you get on the next page depends on the difficulty level you chose.
Thanks!