Answers for "react native hide scrollbar"

5

react native hide scroll indicator

<ScrollView
  showsVerticalScrollIndicator ={false}
  showsHorizontalScrollIndicator={false}
 />
Posted by: Guest on December-13-2020
1

how to detect onend reach of scrollview in react native

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

const isCloseToBottom = ({layoutMeasurement, contentOffset, contentSize}) => {
  const paddingToBottom = 20;
  return layoutMeasurement.height + contentOffset.y >=
    contentSize.height - paddingToBottom;
};

const MyCoolScrollViewComponent = ({enableSomeButton}) => (
  <ScrollView
    onScroll={({nativeEvent}) => {
      if (isCloseToBottom(nativeEvent)) {
        enableSomeButton();
      }
    }}
    scrollEventThrottle={400}
  >
    <Text>Here is very long lorem ipsum or something...</Text>
  </ScrollView>
);

export default MyCoolScrollViewComponent;
Posted by: Guest on October-08-2020

Code answers related to "react native hide scrollbar"

Code answers related to "Javascript"

Browse Popular Code Answers by Language