This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-13
Channels
- # aleph (16)
- # announcements (8)
- # aws (5)
- # babashka (54)
- # beginners (48)
- # calva (7)
- # cider (7)
- # clojure (209)
- # clojure-brasil (4)
- # clojure-europe (20)
- # clojure-italy (12)
- # clojure-nl (21)
- # clojure-uk (69)
- # clojurescript (24)
- # cursive (11)
- # datascript (7)
- # datomic (47)
- # emacs (14)
- # graphql (20)
- # hoplon (25)
- # jobs (1)
- # kaocha (1)
- # leiningen (14)
- # meander (7)
- # off-topic (44)
- # other-languages (1)
- # pathom (20)
- # re-frame (2)
- # reagent (51)
- # reitit (3)
- # remote-jobs (1)
- # shadow-cljs (46)
- # spacemacs (5)
- # sql (65)
- # tools-deps (86)
- # vim (11)
No one with suggestions for handling back-button confirmation?
I don't think there is any great solution, but I've worked around this a few times. I've just called confirm
on onhashchange, and then set location.hash
back to the previous value if needed. Something like:
(if (and before-change-message (not (js/confirm before-change-message)))
(if-let [p @previous-hash]
(set! js/location.hash p))
(dispatch [(keyword "frontend.routes" (name id)) route-data]))
This solution looks promising; however, since we're not using url-fragments, I need something other than location.hash, right?