Share Posted June 27, 2018 Hi, Does GreenSock support React Native? Link to comment Share on other sites More sharing options...
Share Posted June 27, 2018 Hi and welcome to the GreenSock forums. Unfortunately, as far as I know, GSAP can't be used in React Native, due to the way RN actually works. Keep in mind that RN works in a different way than Cordova, PhoneGap and other tools. What I know is that RN uses the Animated API, which jumps directly on the native way for creating animatios. GSAP uses the browser's requestAnimationFrame event to create the animations. Now take this with a grain of salt, because my knowledge lays on the web side of React and not in RN. Although I made a google search for RN animations with JS libraries and there weren't a lot of results. Perhaps you could try going to Reactiflux and go into their discord channel and ask around for animations using an external framework: https://www.reactiflux.com/ Sorry that I can't be more helpful, but it seems that for the foreseeable future just the existent APIs are the ones you'll have to work with. Other options involve using C, JAVA or Swift, like Flutter. Then there's Lottie that allows to export After Effects animations but that's a completely different scenario. Happy Tweening!!! 4 Link to comment Share on other sites More sharing options...
Share Posted August 17, 2018 In my research, I found a fork of GSAP that works with React Native: https://github.com/skevy/react-native-gsap-demo. It's not tested or vetted beyond very simple tweens, but it would be really neat to see Greensock officially support native implementations. I love using GSAP on the web, and it would be amazing to be able to use it with Native Applications as well. :) Link to comment Share on other sites More sharing options...
Share Posted August 18, 2018 @graphical-iain welcome to the forums! I followed some of the links and I'm a bit confused about what exactly is different about the fork of GSAP that works with React Native. Can you shed any light on that? What would we need to do to make it compatible? Link to comment Share on other sites More sharing options...
Share Posted August 19, 2018 On 8/18/2018 at 2:13 AM, GreenSock said: What would we need to do to make it compatible? requestAnimationFrame? https://facebook.github.io/react-native/docs/animations.html#requestanimationframe However, I heard that animation performance in React Native is really bad. 2 Link to comment Share on other sites More sharing options...
Share Posted January 4, 2019 @tufik2 Is there any chance that you can make a small demo repo? I know a lot of people have asked about this. 2 Link to comment Share on other sites More sharing options...
Share Posted January 6, 2019 @OSUblake Yes, I could make a repo the next week in GitHub with a demo and public the link here... 1 Link to comment Share on other sites More sharing options...
Share Posted January 14, 2019 Here I leave a repo in GitHub with a React Native demo app and some explanation about how to implement the plugin in your project. The performance using Direct Manipulation is really good, specially when compile our apps in a release version. https://github.com/tufik2/TweenMaxRN Video: https://www.dropbox.com/s/ioghw2t7ua5agpn/video.mp4?dl=0 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now