Fork me on GitHub
#reagent
<
2017-02-07
>
emccue06:02:55

What happens if you use it on a div wrapping the app route?

gamecubate10:02:48

emccue: I’m guessing from the context that you were referring to my question on HammerJS and Reagent. Problem solved and thus Reagent and HammerJS do play nice with each other. Discovered however that SVGs [on iOS] do not respond to touch events unless they have some kind of contents (e.g., full-width and height rect). Not sure this is a SVG spec effect, an iOS [browser] bug, or a Reagent one.

emccue16:02:33

The iOS issue it beyond my experience, but you can also probably get the HammerJS interop working in a similar way to d3.js (for which there just happen to be more resources and tutorials for working with)

emccue06:02:52

If that works, This sounds like something that a type 3 component might be needed for

borkdude17:02:13

Are multi-arity functions allowed/idiomatic in Reagent?

pesterhazy17:02:22

don't see a reason not to use multiple arities

pesterhazy17:02:47

usually I recommend the pattern (defn my-comp [{:keys [a b c] :as props} & children])

pesterhazy17:02:06

because it matches non-reagent React components

pesterhazy17:02:22

but I think that's a matter of style mainly

borkdude17:02:25

well, if you use (r/props this) it kind of expects that pattern too right?

pesterhazy17:02:50

although I don't see a need to use r/props in the render method

pesterhazy17:02:03

and you can just use r/argv instead of r/props to access everything

borkdude17:02:16

Yeah, I don’t use it there, but sometimes I need it in did-update

pesterhazy17:02:12

yeah I agree it's annoying there