Fork me on GitHub

I bet this has been discussed before, pardon my ignorance, I did not find anything in the wiki nor the docs. My question is regarding 0.8.0. The new subscription model is beautiful but I have one use case I’m not sure if it can accomodate: edit: will add snippet instead


  (fn [[_ user-id] _]
     [(subscribe [:users user-id] 
       (subscribe [:user-settings user-id])])
  (fn [[users user-settings] [_ user-id]]


@mikethompson: Great! And outstanding work on re-frame! A pleasure to work with!


Good to hear 🙂


Another question: could I somehow use subscriptions as input, say that I had to get user-id from (subscribe [:user-id]) instead of from the subscription call?


vikeri the re-frame wiki calls that dynamic subscriptions, see there 🙂


should be the second argument to the first fn in reg-sub


Ok! The wiki is not updated to 0.8.0 on that part, but maybe that is still how it should be done?


but I don't really know, just the dynamic subscription thing 🙂


well, everything from 0.7.0 is still in 0.8.0, just register-sub has been renamed to reg-sub-raw


Alright thanks!


@yogthos: I added memory-hole to the re-frame wiki external resources page


Kind of a noob question: I’m using Bootstrap 4 with reagent/re-frame, and I want to use a button group as a dropdown menu. If I just naively plug in the code from the Bootstrap docs, it doesn’t drop down, which I assume is because Bootstrap js code isn’t expecting to talk to React. So I’m doing the re-frame approach of firing events, setting a flag in the app-db, and having the menu contents show or hide based on the flag. That all works, but it seems labor intensive. Is there a better way?


@manutter51 I suppose it is subjective, but you don't have to put everything into app-db. you could still leverage a simple ratom to handle that component state, assuming it's not needed anywhere else in the app


@manutter51: Have you taken a look at how re-com does things? Might give you some ideas -


Ah, re-com has a dropdown? I’ll have to check that out, I looked at the library once upon a time but it’s been a while. Thanks!


It’s after 5:00 on a Friday after a long week, and an hour ago I decided to move a db column out of one table and into another for better data normalization. Now it’s a little less than an hour later, and I’ve moved the column, updated the migrations, updated all affected SQL queries, updated all the AJAX endpoints, updated all the re-frame event handlers and the UI components, and tested it, and everything works.


Did I mention I FREAKIN LOVE working in Clojure/CLJS/reagent/reframe?


@manutter51: Best feeling ever 🙂


The only downside is this nagging feeling I’m gonna get caught — it’s so much fun, it’s like this has got to be against the rules somehow