Fork me on GitHub
#re-frame
<
2019-04-25
>
ag18:04:26

are there any pros/cons of using form-2 type of component e.g.:

(defn comp []
  (let [counter (r/atom 0)]
      (fn [] ,,,)))
versus using (r/with-let)?

argvader21:04:00

Anybody try optimized builds? Simple works fine but I was trying to get advanced to work. I set pseudo-names to true but I cannot figure out how to get past this error. I thought it might be react-dom but i am including it from cljsjs.. Oh I am using boot to build project. Cannot read property ‘$cljs$core$IFn$_invoke$arity$3$’ of undefined at $reagent$dom$render_comp$$

lilactown21:04:06

it's trying to dynamically invoke a 3-arity function inside of a reagent component. is there a component name in the stack trace?

argvader21:04:12

return $reagent$dom$global$0module$0react_dom$$.$render$.$cljs$core$IFn$invoke$arity$3$?$reagent$dom$global$0module$0reactdom$$.$render$.$cljs$core$IFn$invoke$arity$3$($G_8174$$,$container$jscomp$1$$,$G__8176$$):$reagent$dom$global$0module$0react_dom$$.$render$.call(null,$G__8174$$,$container$jscomp$1$$,$G__8176$$)}finally{$reagent$impl$util$STARalways_update_STAR_$$=$STARalways_update_STAR__orig_val__8172$$}} not sure if this helps. I dont see a component name. I will look at my components. This does work without name munging.

argvader21:04:03

Thanks for the quick reply tho

lilactown21:04:16

sure thing. is this on app startup?

argvader21:04:13

infer-externs didnt show anything.. well it did say goog.DEBUG is not defined

lilactown21:04:48

what's your code look like where you call reagent.core/render?

argvader21:04:25

(reagent/render-component [team-tree] (.getElementById js/document “application”)))

argvader21:04:13

ok think i got it fixed.

lilactown21:04:36

what was it?

argvader21:04:06

thx for the pointer. looks like it was component definition. Interesting optimization died but no warning/errors in none development build

argvader22:04:05

nope that didnt do it. I’ll tackle this later. thanks for the eyes

ag22:04:34

is there a way to use r/track but to track changes in subscriptions?