Skip to content

hosseinmd/react-native-auto-scroller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM

install size dependencies

react-native-auto-scroller

Auto scrolling Component need Dependencies

There are many solutions, but I prefer this one for the best performance. The animations are using useNativeDriver, so they will be send to native and will be perform on the UI thread instead of JS thread.

  • "react": ">=16.8.6"
  • "react-native": ">=0.59"

Installation

npm install --save react-native-auto-scroller

or

yarn add react-native-auto-scroller

Properties

Prop Description Default
style View style _
duration Time to finish a round 10
delay Delay time before start auto scroll animation (ms). 1000

install

npm i react-native-auto-scroller --save
yarn add react-native-auto-scroller

use

import React from "react";
import { AutoScroller } from "react-native-auto-scroller";

class App extends PureComponent {
  render() {
    return (
      <View>
        ...
        <AutoScroller>
          <Image source={myImages} />
          <Image source={myImages} />
          <Image source={myImages} />
          <Image source={myImages} />
        </AutoScroller>
        ...
      </View>
    );
  }
}

About

Horizontal auto scroller component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published