React Native Tabs Section List 项目教程
react-native-tabs-section-list React Native SectionList with scrollable tabs 项目地址:https://gitcode.com/gh_mirrors/re/react-native-tabs-section-list
1. 项目的目录结构及介绍
react-native-tabs-section-list/
├── __tests__/
├── android/
├── ios/
├── src/
│ ├── components/
│ ├── data/
│ ├── styles/
│ └── index.js
├── .buckconfig
├── .eslintrc.js
├── .gitattributes
├── .gitignore
├── .prettierrc.js
├── .watchmanconfig
├── App.js
├── app.json
├── babel.config.js
├── index.js
├── metro.config.js
├── package.json
├── README.md
├── tsconfig.json
└── yarn.lock
__tests__/
: 存放项目的测试文件。android/
: 包含Android平台的项目文件。ios/
: 包含iOS平台的项目文件。src/
: 项目的源代码目录,包含组件、数据和样式文件。src/components/
: 存放React Native组件。src/data/
: 存放数据文件。src/styles/
: 存放样式文件。src/index.js
: 项目的入口文件。.buckconfig
: Buck配置文件。.eslintrc.js
: ESLint配置文件。.gitattributes
: Git属性配置文件。.gitignore
: Git忽略文件配置。.prettierrc.js
: Prettier代码格式化配置文件。.watchmanconfig
: Watchman配置文件。App.js
: 主应用文件。app.json
: 应用配置文件。babel.config.js
: Babel配置文件。index.js
: 项目的启动文件。metro.config.js
: Metro Bundler配置文件。package.json
: 项目的依赖和脚本配置文件。README.md
: 项目说明文档。tsconfig.json
: TypeScript配置文件。yarn.lock
: Yarn依赖锁定文件。
2. 项目的启动文件介绍
index.js
: 这是项目的启动文件,负责初始化React Native应用并加载App.js
文件。
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
AppRegistry.registerComponent(appName, () => App);
3. 项目的配置文件介绍
package.json
: 包含项目的依赖、脚本和其他配置信息。
{
"name": "react-native-tabs-section-list",
"version": "1.0.0",
"description": "A React Native project with tabs and section list",
"main": "index.js",
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"react": "17.0.2",
"react-native": "0.64.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.2.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.4.0",
"react-native-tab-view": "^3.1.1"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/runtime": "^7.14.6",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^27.0.6",
"eslint": "^7.29.0",
"jest": "^27.0.6",
"metro-react-native-babel-preset": "^0.66.0",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
}
react-native-tabs-section-list React Native SectionList with scrollable tabs 项目地址:https://gitcode.com/gh_mirrors/re/react-native-tabs-section-list