Infinitbility
Published in

Infinitbility

Exact auto-scroll in react native scrollView

The simplest way of auto-scroll

Photo by ROBIN WORRALL on Unsplash

Original Post on infinitbility platform

Introduction

The simplest way of auto-scroll store scrolled position on our state and use in the vertical and horizontal auto-scroll.

but how it is possible auto-scroll in react native?

for auto-scroll, we are use scrollView as a ref, and ScrollView provides `scrollTo` function for scrolling on any position in a scroll view.

Solution move to infinitbility platform click below link to access

Table Of content

First Create Refs on Class

Refs provide a way to access DOM nodes or React elements created in the render method. ~ from the react-native document

Store scrolled height and width on state

State generally use in react-native to store data.

Use ScrollView ref to scroll to a destination position

Solution move to infinitbility platform click below link to access

Thanks For Reading…

--

--

--

We have the ability to build infinite way for us. follow us for new way…

Recommended from Medium

Introducing the SEMN stack by building a todo-app

JavaScript Error Objects

Blocked by CORS Policy

Intro to ‘Flux’ Pattern

ESP32 External Display

AstraDEX x Jupiter Exchange

React Native vs Flutter vs Xamarin: How to Choose Hybrid App Development Framework 2019

JavaScript Tips and Tricks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Infinitbility

Infinitbility

Subscribe my newsletter to get weekly updates. — https://infinitbility.com/about

More from Medium

React Native

Top Features of React Native App Development

React & TypeScript: TS2345: Argument of type ‘null’ is not assignable to parameter of type…

Login With Regex Expo React Native

Expo React Native Login Navigation