This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-09
Channels
- # announcements (12)
- # beginners (159)
- # boot (3)
- # calva (41)
- # cider (48)
- # clara (2)
- # clj-kondo (8)
- # cljdoc (8)
- # clojure (70)
- # clojure-dev (10)
- # clojure-europe (2)
- # clojure-losangeles (1)
- # clojure-nl (12)
- # clojure-spec (7)
- # clojure-uk (63)
- # clojurescript (24)
- # cursive (24)
- # datomic (22)
- # expound (17)
- # figwheel (1)
- # fulcro (176)
- # graphql (23)
- # jobs (9)
- # jobs-discuss (56)
- # kaocha (1)
- # mount (3)
- # nyc (1)
- # off-topic (91)
- # onyx (3)
- # overtone (4)
- # pathom (3)
- # pedestal (1)
- # re-frame (11)
- # reitit (19)
- # ring (8)
- # shadow-cljs (16)
- # test-check (5)
- # testing (2)
- # tools-deps (20)
- # vim (9)
thinking about using it so I can get away from the function as a child pattern in my Apollo components
it also seems to have some other solid benefits like smaller bundle size, auto refreshing cache on component mount
@lilactown I saw you mentioned using apollo-client
directly instead of react-apollo
. how has that been?
For cljs, especially if you use re-frame, but also if not, https://github.com/oliyh/re-graph works very nice.
I did try out re-graph, one thing I struggled with was how I should use the result of a query to render a component, since it fires a callback instead of returning a value.
I’m coming from js where I would do something like const CarList = () => <Query>{ ({data}) => <list>{data.cars}</list> }</Query>
and writing out the fn as a child pattern in cljs is a pain. It would be nice to be able to do
(defnc my-component [] (let [{:keys [data error loading]} (use-query my-query)][:list …]))
@stefan.age if you're using hx, I would try react-apollo first
But then realized maybe I can get away from fn as a child components with apollo-client