Add wix interactable library
closed
Adam Perry
"Wix made this awesome highly performant animation/interaction library. I know it's kind of a stretch to be adding all kinds of things to the exponent core, but this would be a great addition:
"Thanks for the suggestion, we agree it looks awesome and are discussing this internally. There are also some changes to the library that would make it easier to pull into Expo, which we've asked about. See relevant discussion here."
Brent Vatne
We changed our minds on this and decided that we will only include react-native-gesture-handler. The API is coming along very well and we will ship the first release of it likely in SDK21. Follow progress on http://github.com/kmagiera/react-native-gesture-handler where there has been a bunch of activity recently.
Brent Vatne
closed
Brent Vatne
in progress
Brent Vatne
we are working on something comparable here: https://github.com/kmagiera/react-native-gesture-handler
a
Brent Vatne: Interactable is way much mature and has better support and available examples, what I achieved in 30 min with Interactable took me 12 hrs with the current Animated.
a
Brent Vatne: Support for both would be nice, but Interactable should be prioritized I think, it makes implementing animations way way much easier.
Brent Vatne
a : we'll see how react-native-gesture-handler works out ;) it's very similar, and it actually inspired interactable. gesture-handler is meant to play more nicely with existing react-native touch apis. gesture-handler is also written by a guy who implemented native driver for animated and did a bunch of work on react native android while he was at facebook :) if interactable ends up being a better option, we will try that too!
a
Brent Vatne: I am very familiar with Krzysztof's work, in his latest talk he even recommended Interactable. GestureHandler should eventually be in RN core, I think that's the goal, but it's not currently mature enough if you are looking to have this in by SDK 20 let's say, it's a lower layer compared to Interactable, you would typically use GestureHandler to build something similar to Interactable. Interactable has a very rich API which help addressing very complex animation concepts, eventually I would like to see it in RN core too, animations should be that easy :) I was very impressed when Tal's introduced it in ReactConf, but was completely mind blown when I actually sat down and wrote some code with it. Try implementing something like this https://www.uplabs.com/posts/movie-ticket-challenge with the three paradigms, with Interactable this is a breeze.
a
Brent Vatne: Ah, one thing to note though, Interactable doesn't play nicely with an Expo detached project, doesn't work with react-native link for some reason (build fails), had to switch to a vanilla RN app, and it linked without any issues, perhaps that's something worth looking into.
a
Brent Vatne: and I just noticed that I was writing it "Intractable" all this time 😅
Evan Bacon
a : [UNRELATED] I believe https://github.com/airbnb/react-native-maps has an example pretty similar to the first animation you provided.
a
Evan Bacon: ended up writing my own lib to build that concept https://github.com/sonaye/react-native-behavior (it simplifies animated), I've looked at your post in the past as well, decided to build the lib instead of writing in pure animated api, too much coding to achieve very straight forward ideas.
Evan Bacon
a : bruhhh, you win person of the day award.
a
Actually after replying to Brent here I decided to give it a shot, and after seeing how the Behavior Designer in Flinto works, I thought we should have something similar in RN, you define the states of your component, and then just animate between them, we don't really need to know all the details behind the scenes for many common use cases, this is one of the objectives Interactable is trying to achieve.
Brent Vatne
a : seems reasonable, Krzysztof and I discussed this and decided we can include it under the DangerZone namespace for now (as I'm not sure how stable the API is) and eventually we can rewrite it on top of react-native-gesture-handler.
a
Brent Vatne: 😋
Brent Vatne
a : it turns out we are blocked on this right now by an upstream issue: https://github.com/wix/react-native-interactable/issues/37 -- want to send a PR to fix that? we can bring it in if so
a
Brent Vatne: I am not proficient enough in IOS native to take on such a task I am afraid, planning to spend the summer taking a couple of courses learning it, shifting from pure JS to JS with native, I guess our best hope at the moment is that this finds its way to work itself out on the issue you mentioned