This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-30
Channels
- # adventofcode (1)
- # announcements (1)
- # babashka (5)
- # beginners (344)
- # bristol-clojurians (1)
- # calva (18)
- # cljfx (6)
- # clojure (85)
- # clojure-europe (37)
- # clojure-finland (1)
- # clojure-france (2)
- # clojure-nl (2)
- # clojure-taiwan (3)
- # clojure-uk (17)
- # clojurescript (13)
- # conjure (23)
- # cursive (25)
- # datomic (7)
- # fulcro (62)
- # java (7)
- # jobs-discuss (8)
- # malli (3)
- # off-topic (22)
- # portal (18)
- # reagent (34)
- # reitit (8)
- # releases (3)
- # shadow-cljs (18)
- # tools-deps (1)
How do I unleran Reitit router to follow links like #
(they are just actions on a page for me)?
Using even :ignore-anchor-click? (fn [router e el uri] true)
didn't help — it's still following
alright, this is 'cause of clicks to "#" causing popstate event
i.e. it's this:
:listen-key (gevents/listen js/window goog.events.EventType.POPSTATE handler false)
event handler that fires:ignore-anchor-click?
(fn [router e el uri]
;; Add additional check on top of the default checks\
(and
(rfh/ignore-anchor-click? router e el uri)
(not (let [href (or (.-href el) "#")
result (clojure.string/includes? href "#")]
(js/console.log "href" href)
(when result
(.preventDefault e)
(js/console.log "will prevent by href" href))
result))))
ended up doing like this
Hi all in Reitit Channel. Wanted to let you know that http://LearnReitit.com course is ready. It’s around 9h of content and it’s still available in early access price. If video courses are something you enjoy check it out!
👍 12