Fork me on GitHub
Shako Farhad15:05:11

Anyone have experience with re-animated and GestureHandler?

Shako Farhad15:05:06

This does not work

Shako Farhad15:05:59

Anyone know why the second one does not work? It is as if I am not recieving any native events. The cursor is not moving at all. It is really frustrating because if the second one does not work, then I have to make new values and new gesture function handlers for each and every button instead of having a function that generates it all :s

Shako Farhad15:05:00

Does all re-animated values and functions have to be global? Is that why? Is it perhaps possible to create global variables with a function?


I think may have fixed the Krell Windows path issues, give it a spin if you're on that platform


@shakof91 I have some experience, but it has been a while; I believe you’re correct; you can setup a fn like:

(defn onGestureEvent [tX tY]
  (re-animated/event [{:nativeEvent
                       {:translationX tX
                        :translationY tY}}]))
… and then yes, for each component you can create a new tX, tY etc


… or re-use the same one… really depends on what you’re trying to achieve; I usually have a global ClojureScript (defonce mutable-state (atom {})) that holds all my mutable “stuff” that’s not a ClojureScript immutable data structure; that way I can globally add to or get from that atom from anywhere in the project

Shako Farhad20:05:23

@raspasov That makes sense. Interesting. Thanks for the feedback! I will look into it!


@shakof91 no problem ✌️


can anyone tell me how to disable the build-in reloading expo does? fast refresh I can disable but it still does something else it seems?


shake your device, there might be some options


done that ... (there used to be a second option, now there is only fast refresh)


hmm.. yea not sure 🙂 don’t use Expo myself…

Oliver George21:05:57

@dnolen that’s exciting. I’ll give Krell on Windows a spin over the weekend.