Fork me on GitHub
#reagent
<
2016-06-30
>
escherize01:06:11

or:

(def awesome-form-class "??")

[:form
  {:id "my-awesome-form"
   :class awesome-form-class} …]

escherize01:06:52

maybe too much indirection

lwhorton19:06:57

what’s the proper way to get props from a component inside a custom-hook :component-did-mount [this]?

blance19:06:44

(reagent.core/props this)

gowder22:06:17

I just had a really weird idea. Do reagent components side-effect on render? Like, suppose I did something like:

(defn some-comp [] (do (some-side-effect) [:p (str @some-ratom)]))
If I then stuck some-comp into something that rendered, would it do the side effect once, every time some-ratom were derefed, never, just throw an error? I might have to experiment with this a bit...

gowder23:06:12

(I suppose the easy alternative is just to cook up a macro)