Fork me on GitHub

I'm building a react native app with Rum, and using PanResponder to handle gesture input. I create a PR at component-will-mount time and assign it to the component's state, but one of the callbacks needs to access the current props of the component. Is there an easy way to get that or should I resign myself to doing something like this: (-> state :rum/react-component .-props js->clj (get ":rum/initial-state") :rum/args first)


I think js->clj is an overkill here. Just use JS property accessor (gobj/get or smth like that)


but I don’t understand, you need to get to the rum state from rum component, why go all this way around? state is already passed into callbacks?


it's not a react component callback, it's a PanResponder callback


PanResponder is a RN API for dealing with gestures


so you can use it alongside a component for doing stuff like drag and drop