This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-03
Channels
- # aws (5)
- # beginners (67)
- # boot (30)
- # cider (55)
- # clara (7)
- # cljs-dev (6)
- # cljsjs (6)
- # cljsrn (1)
- # clojure (136)
- # clojure-brasil (2)
- # clojure-dusseldorf (14)
- # clojure-finland (9)
- # clojure-italy (49)
- # clojure-nl (1)
- # clojure-romania (6)
- # clojure-russia (4)
- # clojure-uk (16)
- # clojurescript (136)
- # core-async (1)
- # cursive (21)
- # datomic (64)
- # fulcro (26)
- # hoplon (25)
- # jobs-discuss (53)
- # keechma (3)
- # leiningen (6)
- # luminus (11)
- # lumo (2)
- # off-topic (351)
- # om (1)
- # onyx (11)
- # parinfer (32)
- # portkey (9)
- # re-frame (45)
- # reagent (38)
- # shadow-cljs (60)
- # specter (9)
- # vim (8)
- # yada (22)
Are set-query!
calls handled asynchronously? The get-query of my component doesn't change after using set-query!
But it does seem to pull in the changed query data after a push. Strangely enough it doesn't do that a second time though.
@bbssNot async, no. It is not heavily used, and was radically changed at 2.0…so expect that you could possibly find a bug. The refresh rules are identical with transact (in fact, it is a transact internally)
in other words, refresh happens on the subtree where the set-query!
runs. You’ll need to add :follow-on-reads
to the options if you want to refresh other parts of the UI tree.
Also, in case you’re analyzing the output of get-query
in a REPL: get-query
is now technically a function of app state. When you call it in a UI component there is a dynamically bound var to app state that get-query can pull from. You’ll notice that it accepts a second parameter (get-query C state)
…this is the version you’d need to use from a REPL to see the updated query. There are a decent number of tests around the dynamic query algorithms, and if they’re working for you “a second time”, then you really just need to make sure the refresh rules are being met as normal.
hi are there any examples around of setting up client request middleware ? I need to tack a JWT token onto my requests. I’m assuming this is the best way to do it?
https://github.com/fulcrologic/fulcro/blob/develop/src/main/fulcro/client/network.cljc#L118
https://github.com/fulcrologic/fulcro/blob/develop/src/main/fulcro/client/network.cljc#L344
I’ve updated the Developer’s Guide to not include the bootstrap chapter (which is now just a top-level doc in Fulcro repo for now). This makes it load much faster.
Hey I did this, seems to be working,but just wanted to make sure there’s nothing obviously amiss
(defn token-wrap-request
"just passthrough for now"
([] (token-wrap-request identity))
([handler]
(let [new-handler (net/wrap-fulcro-request handler)]
(fn [req]
(println "passing through" )
(new-handler req)))))
ah see, lol, that’s why I asked, haven’t really done much with ring so you mean like threading the handler through them?