This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-25
Channels
- # aws (1)
- # bangalore-clj (1)
- # beginners (15)
- # boot (4)
- # clara (7)
- # cljs-dev (7)
- # cljs-experience (3)
- # cljsrn (1)
- # clojure (143)
- # clojure-austin (2)
- # clojure-germany (1)
- # clojure-italy (11)
- # clojure-serbia (11)
- # clojure-spec (96)
- # clojure-uk (20)
- # clojurescript (70)
- # community-development (58)
- # cursive (14)
- # data-science (1)
- # datomic (45)
- # events (2)
- # fulcro (19)
- # jobs (5)
- # jobs-rus (2)
- # off-topic (40)
- # om (24)
- # onyx (3)
- # parinfer (52)
- # pedestal (6)
- # protorepl (38)
- # re-frame (15)
- # reagent (11)
- # ring-swagger (5)
- # specter (37)
- # sql (3)
- # unrepl (3)
- # vim (1)
Hello, does anyone struggle to have the same node props computed on the client and on the server
:value
and :required
are never computed the same @home
Has anyone had this error happen when invoking mutations: "No queries exist for component path (meds.core/Root meds.core/MedicationsTab meds.core/MedList)"
Yes @roklenarcic, usually it means you're stealing queries and they don't compose properly.
The page renders without errors, including the querying and reads (on this path included), but when I call (om/transact! this `[mutation]), where this is an instance of MedList, I get that error
Is using ~@(om/get-query ....) a bad thing in that regard?
Not necessarily, it depends how. Can you show your query?
Root: `[:ui/react-key @(om/get-query MainNav) @(om/get-query MedicationsTab)]
MedicationsTab: `[{:med-lists ~(om/get-query MedList)}]
MedList: `[:level :selected {:items ~(om/get-query MedListItem)}]
MedListItem: [:id :name :level]
MainNav: '[:nav-expanded]
let me grab the whole thing
om/get-query Root returns [:ui/react-key :nav-expanded {:med-lists [:level :selected {:items [:id :name :level]}]}]
and as far as reading goes, it works like intended
only mutation throws an error
hm I guess by using ~@(om/get-query MedicationsTab) I lose metadata
is there another way to compose multiple component into the root query?
You need to give it a key like {:medications ~(om/get-query MedicationsTab)}
You can't include child queries directly in the parent, this is what 'stealing' refers to.
It must go through a join.
This is so that om can construct a clear path through the component hierarchies (and what No queries exist for component path refers to)
I did what you suggested and now it works
thank you
The need of keeping those vectors intact needs to be mentioned in big bold letters somewhere. It kinda goes against the basic clojure premise (manipulate and combine data to achieve composability).
and the idea that any two vectors are interchangeable as long as contents are the same
It is a common gotcha
I'm trying to setup a client server architecture where I have token authentication. I'd like to pass the token to the server with each remote send message. However the the remote function only gets the query. I feel weird about dipping into the app-state of the client to get the token as that seems to be an anti-pattern for functional programming. Is there a good reason why the remote send function isn't passed the Environment, Key and Parameters, like the reader is?