How to use the @shoutem/animation.ScrollDriver function in @shoutem/animation

To help you get started, we’ve selected a few @shoutem/animation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shoutem / ui / components / ScrollView / ScrollView.js View on Github external
constructor(props, context) {
    super(props, context);
    this.animationDriver = props.driver || new ScrollDriver({ useNativeDriver: true });
    this.setWrappedInstance = this.setWrappedInstance.bind(this);
  }
github shoutem / animation / examples / ShoutemAnimation / components / HeroHeader.js View on Github external
render() {
    const restaurant = this.getRestaurant();
    const driver = new ScrollDriver();
    return (
      
        
          
            
              
                
                  
                    <title>{restaurant.name}</title>
                    {restaurant.address}
github shoutem / animation / examples / ShoutemAnimation / components / Parallax.js View on Github external
constructor(props) {
    super(props);

    this.renderRow = this.renderRow.bind(this);
    this.driver = new ScrollDriver();
  }
github shoutem / ui / components / ScrollView / ScrollDriverProvider.js View on Github external
setupAnimationDriver(props, context) {
    if (props.driver) {
      this.animationDriver = props.driver;
    } else if (context.driverProvider) {
      this.animationDriver = context.animationDriver;
    } else if (!this.animationDriver) {
      this.animationDriver = new ScrollDriver({ useNativeDriver: true });
    }
  }