Answers for "scrollview automatically scroll to the bottom react native"

0

React Native Expo Scrollview Scroll to bottom

import React, { useRef } from 'react';
import { ScrollView } from 'react-native';

const ScreenComponent = (props) => {
  const scrollViewRef = useRef();
  return (
    <ScrollView
      ref={scrollViewRef}
      onContentSizeChange={() => scrollViewRef.current.scrollToEnd({ animated: true })}
    />
  );
};
Posted by: Guest on October-30-2021

Code answers related to "scrollview automatically scroll to the bottom react native"

Browse Popular Code Answers by Language