Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Nirmal

React Native Support

Recommended Posts

Hi,

 

Does GreenSock support React Native?

Link to comment
Share on other sites

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!!!

  • Like 4
Link to comment
Share on other sites

  • 1 month later...

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

@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

  • 4 months later...

@tufik2

 

Is there any chance that you can make a small demo repo? I know a lot of people have asked about this.

 

 

  • Like 2
Link to comment
Share on other sites

@OSUblake 

 

Yes, I could make a repo the next week in GitHub with a demo and public the link here... 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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

 

tweenmaxRN.gif

 

 

  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×