Fork me on GitHub
#re-frame
<
2015-10-28
>
nowprovision07:10:55

it seems like 90% of my subscribes could be replaced by (fn [db [_ filters] (reaction (get-in @db (rest filters))) wondering if Im creating a smell..

Tom H.08:10:12

@nowprovision is there more 'work' you could be doing in your subscriptions that you're doing in your renders? Filtering etc?

nowprovision08:10:31

I guess with mickey mouse experiment at the moment Im not hitting any special filtering or projection use cases.. i think i'll work around initially by creating a simple-sub that simply & args into get-in on db.. until I need more advanced subs

pepe10:10:09

@nowprovision: I have very similar experience

mccraigmccraig10:10:17

@nowprovision: i had a similar experience at the beginning of my current project... it became less bothersome as the project got bigger, my subs.cljs got split across several namespaces

darwin13:10:53

@nowprovision: that is natural I think, but it might lead to a performance issue if you have hundreds or thousands of such subscriptions: https://github.com/reagent-project/reagent/issues/165

pepe13:10:17

@darwin: great discussion on the issue

mccraigmccraig19:10:33

has anyone tried re-frame with react-native ?

mccraigmccraig19:10:06

i'm using re-frame to build a cordova app atm, and am wondering if i could reasonably keep all of the core of the app and re-skin it with react-native ui

decker40520:10:13

That should most likely work. I’ve been playing with reagent, re-frame, and react native a lot lately. I’ve got a demo project to get figwheel, reagent, and react native running here: https://github.com/decker405/figwheel-react-native

decker40520:10:34

It should be trivial to add re-frame to that

mccraigmccraig20:10:34

@decker405: thanks - that project looks like it might be very useful to me simple_smile

decker40520:10:41

@mccraigmccraig: No problem. Also http://cljsrn.org/ has a bunch more information on react native and clojurescript, as well as other options for setting up.