This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-21
Channels
- # beginners (165)
- # boot (9)
- # cider (9)
- # cljs-dev (5)
- # cljsjs (5)
- # clojars (4)
- # clojure (207)
- # clojure-brasil (1)
- # clojure-greece (3)
- # clojure-poland (2)
- # clojure-russia (6)
- # clojure-spec (85)
- # clojure-taiwan (1)
- # clojure-uk (53)
- # clojurescript (96)
- # community-development (2)
- # cursive (4)
- # datomic (14)
- # emacs (41)
- # events (2)
- # hoplon (184)
- # leiningen (1)
- # nginx (1)
- # off-topic (16)
- # om (7)
- # onyx (63)
- # pedestal (27)
- # planck (17)
- # protorepl (3)
- # rdf (9)
- # re-frame (62)
- # reagent (7)
- # ring-swagger (5)
- # schema (2)
- # spacemacs (5)
- # test-check (25)
- # untangled (93)
- # yada (3)
Does anyone know an example where you're receiving a list from some remote and need merge to handle normalization?
I found something using tree->db https://github.com/ladderlife/om-fullstack-example/blob/master/src/shared/om_fullstack_example/client.cljc#L138 which seems to work
is there an equivalent pattern in om to higher order components or mixins? I guess I could write HOCs in om, but I'd have to pass through the static IQuery protocol methods?
I noticed that the :component
key in the AST is the child component with the ident...I need to get the root component to be able to pass it to tree->db
@tobiash Not sure, but my first inclination would be to use component composition to solve this- It's notable that the obvious example in the documentation for HOC (heterogenous lists) does not use any polymorphism or HOC https://github.com/omcljs/om/wiki/Queries-With-Unions
@tobiash maybe this is interesting for you: https://anmonteiro.com/2016/01/exploration-patterns-om-next-part-2/
Going through the om.next docs, it's not clear to me what the purpose of having a :value
key on the map returned from a mutation function. From the docs:
> Mutations should return a map for :value. This map can contain two keys – :keys and/or :tempids. The :keys vector is a convenience that communicates what read operations should follow a mutation.
So it's just for the developer? Or does om actually use it internally?