This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-06
Channels
- # architecture (25)
- # bangalore-clj (1)
- # beginners (21)
- # boot (45)
- # cljs-dev (38)
- # clojure (272)
- # clojure-austin (7)
- # clojure-finland (7)
- # clojure-france (3)
- # clojure-italy (7)
- # clojure-japan (1)
- # clojure-russia (13)
- # clojure-spec (36)
- # clojure-uk (31)
- # clojurescript (96)
- # core-async (15)
- # cursive (16)
- # datascript (3)
- # datomic (97)
- # emacs (107)
- # hoplon (16)
- # jobs (9)
- # keechma (1)
- # luminus (1)
- # off-topic (19)
- # om (39)
- # onyx (15)
- # pedestal (3)
- # planck (22)
- # protorepl (4)
- # re-frame (20)
- # reagent (3)
- # ring-swagger (25)
- # specter (26)
- # test-check (19)
- # testing (1)
- # untangled (381)
@isak yes! I'm -> https://github.com/victorvoid/barrHub/blob/master/barr-hub/src/cljs/barr_hub/routes.cljs#L11
@victorvoid you need to hang onto the History instance you create, and call setToken on that
Do you have some example code?
sorry
(def history (doto (Html5History.)
(.setUseFragment false)
(.setPathPrefix "")
(.setEnabled true)))
(defn navigate-to [route]
(let [path (match-route route)]
(.setToken history (unmatch-pair {:handler (:handler path)
:params (:route-params path)}))))
Thanks very much bro! I'll try, but in my form I use 'preventDefault' and 'navigate-to '/search/?q=test')' right ? but in all view I need put it history ? or only 'navigate-to' ?
or it history put only in my routes.cljs ?
you just need to make sure any time you interact with history, it is the same instance. we should probably take this to #clojurescript, because it is not really re-frame specific
@caryfitzhugh Yes, thank you. I ended up doing something similar, but more rudimentary. Your implementation gives me a couple ideas where I can improve. Thanks again!
:thumbsup:
@victorvoid: you might check out pushy for the HTML5 nav stuff, it's just a wrapper around the goog.history stuff but easier to work with IMHO
Question for any re-frisk users out there: After installing the library, and putting a call to (enable-re-frisk!)
what is supposed to happen? I've done those steps from the doc, and am not seeing any kind of change, like the re-frisk debugger window, or anything else.
@isak Ah, thanks! Totally missed that. 👀 Had a grey box UI element in the same place, oops.
Just wanted to publicize the release of my re-frame-based desktop app, Smyrna, a search tool for Polish texts. https://github.com/nathell/smyrna