This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-23
Channels
- # beginners (8)
- # boot (87)
- # cider (16)
- # cljs-dev (1)
- # cljsrn (2)
- # clojure (27)
- # clojure-austin (2)
- # clojure-beijing (1)
- # clojure-belgium (1)
- # clojure-russia (66)
- # clojure-uk (17)
- # clojurescript (48)
- # core-typed (1)
- # cursive (3)
- # datomic (8)
- # emacs (7)
- # funcool (3)
- # hoplon (22)
- # instaparse (1)
- # jobs-discuss (4)
- # leiningen (2)
- # om (17)
- # onyx (16)
- # reactive (2)
- # reagent (7)
- # rum (2)
- # specter (1)
- # untangled (3)
@grounded_sage: i got this exercise to work, maybe your issue has to do with (om/computed people deletePerson)
(it should be like (map (fn [person] (om-person (om/computed person {:onDelete #(js/console.log "delete" p)}))) people)
)
Yea that makes sense. Thanks I managed to get it. Must just be sleep deprived 😛
tree->db assumes for a 'many join' [{:foos (get-query Foo)}] that the first of the idents is the same for all the foos
1.0.0-alpah34 released, @anmonteiro’s query updating stuff merged in, big change, so feedback welcome
No breaking changes here, even the router seems to work fine, will throw some 'big-data' at it
specifically, you want to be testing getting and setting queries
especially setting queries in 1-1 joins down the component hierarchy
and see if get-query
of the root instance has the changes reflected
K, I'll throw in some of those scenarios
One thing I've been wondering: would it be a good idea to pass the reconciler to the send function? (provided by Om self) There are some scenarios where I want to run a bunch of mutations when something comes back from the server. Think user logs in, transact a mutation that redirects to some page, or show an error message things went wrong at the server. For now I have to do something like
(defn make-reconciler
[{:keys [state parser merge merge-tree migrate id-key]}]
(let [escape-hatchet (atom nil)
config {:state state
:parser parser
:migrate migrate
:id-key id-key
:merge merge
:merge-tree merge-tree
:send (transit-post "/api" (assoc {} :reconciler escape-hatchet))}
reconciler (om/reconciler config)]
(reset! escape-hatchet reconciler)
reconciler))
to avoid a circular dependency & have the reconciler available in my send function
Is this outside the scope of Om self?The merge function gets the reconciler, derefed app state, server response and the query request if that helps.
Though I wouldn't mind getting the reconciler in the send function. I have a case where I like to alter the state on certain read remotes, and it makes sense to do it in send, when I know what all the remote values are. You can potentially do the transact in the read function, when there is a remote target, but it didn't seem right to be doing transactions in the read function.
The docs on set-query!
says that re-sends will happen when necessary. Anyone know how it is decided when it’s necessary?
Tried looking into the set-query!
-function but it’s a bit difficult to grasp
If the component that set-query! has anything in its query that causes a remote read, or if you specify any reads as a last argument to set-query!