Fork me on GitHub

For stateful rendering functions that could get quite large with handlers and such, what is the recommended course of action to keep them manageable


anyone know good examples of creating a react component from reagent? trying to create a reusable react component in cljs and publish to private npm repo


i guess it's not a typical usecase


thanks, yes i was looking at that one


couldn't find any examples


sweet, it works with form-3 components


Hi, I'm running into a bit of a problem regarding the subscription cache ratoms, and hoping I can get some clarification! I'm getting the ratoms from: @re-frame.subs/query-reactionwhich returns a map of subscriptions and Reaction objects. I'm then trying to monitor the number of watchers on a subscription reaction, and I can get the watchers to increment when the component displaying the data "unmounts", the watchers persistent - the number of them doesn't ever go back to 0, unless I reload the page.


Should (.-watches <#some reaction>) return a live count of watchers (i.e. should they be incrementing and decrementing) or am I misinterpreting how the watchers work?


My flow:
(def reaction (get @re-frame.subs/query->reaction [[:some-key] []])))

(.-watches reaction) ;; returns the list of watchers - the problem is here, I would have thought the list of watchers would shrink when the data is no used by a component in the DOM
@reaction ;; returns the current value.


@trailcapital you might try in #re-frame as your question is really about that rather than reagent


ah, true - I'll do that!


I may have figured it out, so my repost will be pending that!


Hey reagent folks, are we supposed to be wrapping all of our dynamic lazy lists in doall ? (


I am also curious if there is any performance trade-off for using into vs map or for. With (into [:div] ...) you no longer need to use React keys because there is no list. Does using lists improve performance by chance? I don't know much about React internals