Home >Web Front-end >Front-end Q&A >How to hide scroll bar scrolling in react

How to hide scroll bar scrolling in react

藏色散人
藏色散人Original
2022-12-21 15:38:283088browse

How to hide scroll bar scrolling in react: 1. Open the corresponding "react-native" file; 2. Set horizontal scrolling through horizontal; 3. Hide horizontal by setting the value of "showsHorizontalScrollIndicator" to "false" Just scroll bar.

How to hide scroll bar scrolling in react

The operating environment of this tutorial: Windows 10 system, react-native version 0.67, Dell G3 computer.

How to hide scroll bar scrolling in react?

react-native implements horizontal scrolling and hides the scroll bar

   showsHorizontalScrollIndicator值为false隐藏水平滚动条
   horizontal为true设置水平滚动
         renderItem = ({ item }) => (<Text>{ item.tile}</Text>);
        const data =[{id:1,title:&#39;11111111111111111111111111&#39;}];
        <FlatList
          horizontal
          data={data}
          renderItem={this.renderItem}
          keyExtractor={item => item.id}
          showsHorizontalScrollIndicator={false}
        />

Related introduction:

React Native (RN) was open sourced by Facebook in April 2015 The cross-platform mobile application development framework is a derivative of Facebook's earlier open source JS framework React on the native mobile application platform. It supports the two major platforms of iOS and Android. RN uses Javascript language, JSX similar to HTML, and CSS to develop mobile applications, so technicians who are familiar with Web front-end development can enter the field of mobile application development with very little learning.

Recommended learning: "react video tutorial"

The above is the detailed content of How to hide scroll bar scrolling in react. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn