Hello
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!