Skip to content

skevy/react-native-gsap-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

GSAP on React Native!

This is a demo showing basic usage of GSAP's TweenMax and TimelineMax in React Native by simply tweening state using HZDG's awesome gsap-react-plugin.

animation

A few notes:

  • This uses my fork of GreenSock-JS (https://github.com/skevy/GreenSock-JS/tree/node-compat), in order to play nice with the fact that React Native doesn't have "document" defined.
  • gsap-react-plugin handles tweening the state, while React Native itself has already polyfilled requestAnimationFrame (which uses React Native's optimized RCTTimer)

Future Work

This is not the end-all-be-all of React Native animation, and has not been extensively tested more than just a few proof's of concept and with simple animations.

Looking to the future of using GSAP with React Native, a plugin could be written to directly tween using React Native's setNativeProps, which would avoid a full render pass, as @sahrens recommends here.

About

GSAP on React Native Demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published