Fork me on GitHub
#reagent
<
2018-06-27
>
juhoteperi09:06:47

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.

❤️ 12
💯 4
kasuko17:06:33

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.

kasuko17:06:54

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.

kasuko17:06:03

Any thoughts on a viable alternative?

lilactown18:06:19

i think it makes sense. the reaction is just a more fine-grained way of creating something like a ratom.

lilactown18:06:00

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

kasuko18:06:48

Damn I spent so long searching for someone having done it but I had re-frame on my mind ... never looked for reagent!

kasuko18:06:18

Any plans on releasing it as a library?

lilactown18:06:50

I do plan on it. there's still some work to be done

lilactown18:06:22

the biggest thing is fixing the server-side rendering. it's currently not safe to use

kasuko18:06:52

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.

lilactown19:06:15

I think on the client-side, I've been thinking about how to expose the refetch method on the subscription

lilactown19:06:35

also how to effectively document everything since it's a fairly tight binding to the apollo-client library

lilactown19:06:55

any ideas/improvements there would be very helpful!

lilactown19:06:55

also just implementing the functions that are marked as STUB 😅 they're not hard just short on time atm