This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-27
Channels
- # aleph (10)
- # beginners (139)
- # cider (47)
- # clara (19)
- # cljs-dev (2)
- # cljsjs (9)
- # clojure (94)
- # clojure-berlin (1)
- # clojure-dev (23)
- # clojure-greece (5)
- # clojure-italy (5)
- # clojure-nl (14)
- # clojure-uk (36)
- # clojurescript (85)
- # cursive (2)
- # datomic (56)
- # emacs (3)
- # events (1)
- # fulcro (33)
- # garden (3)
- # graphql (6)
- # hoplon (53)
- # jobs (1)
- # leiningen (4)
- # mount (46)
- # nrepl (7)
- # off-topic (8)
- # om (3)
- # other-languages (4)
- # pedestal (7)
- # portkey (7)
- # re-frame (1)
- # reagent (16)
- # remote-jobs (3)
- # ring-swagger (2)
- # shadow-cljs (16)
- # slack-help (2)
- # tools-deps (2)
- # yada (1)
Okay, the Learn Reagent video series is now public, here is a link with coupon code: https://www.jacekschae.com/learn-reagent-pro/tycit?coupon=REAGENT. Reagent readme also now links to this series.
Hey guys I am trying to do something weird and I just would like some feedback. I really like what is going on with the ApolloClient and GraphQL and I have some interesting plans for using it in a re-frame app. So right now I am prototyping hooking up the reactive ApolloClient with reagent's reactivity.
Everything is working and I am successfully getting data! What I am interested in is the oddity in the watch-query
function. It seems weird to make a reaction
that only dereferences the r/atom
in order to have the ability to dispose the JS Observable Subscription when it is no longer used.
that's the same exact approach I took: https://github.com/Lokeh/apollo-reagent/blob/master/src/apollo_reagent/core.cljs
i think it makes sense. the reaction is just a more fine-grained way of creating something like a ratom.
most of the time ratoms are disposed on willUnmount and GC'd when they're no longer used but in this case we need to hook into that behavior
Damn I spent so long searching for someone having done it but I had re-frame on my mind ... never looked for reagent!
the biggest thing is fixing the server-side rendering. it's currently not safe to use
Anything I can do to help? I was building this to get a library to build a re-frame app where I have replaced the app-db and level1 subscriptions with the apollo cache and graphql queries (utilizing local state as well), seems selfish to duplicate the effort.
I think on the client-side, I've been thinking about how to expose the refetch
method on the subscription