Fork me on GitHub
#reagent
<
2016-08-29
>
domgetter20:08:53

If I try to add :pointer-events to a :style map, it doesn't get added to the html tag. Is this intended, or should I open an issue?

domgetter20:08:18

Nevermind, I added :pointer-events none instead of :pointer-events "none"

michael.heuberger21:08:54

hello reagent folks - i’ve got some questions related to this JS stateful component example: https://github.com/Day8/re-frame/blob/master/docs/Using-Stateful-JS-Components.md

michael.heuberger21:08:46

#1 reading the props via (reagent/props comp) … why not read them from (defn gmap-inner [props] … instead? any good reasons for this?

michael.heuberger21:08:00

#2 is there a good reason to pass around the comp parameter taken from :component-did-mount (fn [comp] …?

martinklepsch22:08:47

@michael.heuberger #1: when using lifecycle methods reagent/props is the only way to get up-to-date props (inside render there's no reason to use reagent/props) #2: pass around in what way? Either you need the component instance for something or you dont 🙂

martinklepsch22:08:52

I often end up wanting to trigger a file input via JS as described here: http://stackoverflow.com/questions/8595389/programmatically-trigger-select-file-dialog-box The lack of React Refs in Reagent make this trickier than it should be. What is "your hack" to trigger clicks on on an element programmatically?

michael.heuberger22:08:43

ah, thanks for the reminder - think i should re-read some docs over again

martinklepsch22:08:24

@michael.heuberger this could be a step ahead but might be insightful with regards to props & reagent as well: https://www.martinklepsch.org/posts/props-children-and-component-lifecycle-in-reagent.html

michael.heuberger22:08:45

thx man, much appreciated