rn-project
Version:
#### 项目介绍 类似一个脚手架的工具 此项目致力于构建一套基础,简单,可维护的 适配我司的react-native项目。可在此基础上搭建项目,封装了基础架构,基础组件,以及各种交互等;可快速进行项目搭建,开发。 # 涉及主要技术 - 1. 项目主要架构 * react native * react-navigation * redux
94 lines (84 loc) • 2.33 kB
JavaScript
import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import PropTypes from 'prop-types';
import { SafeAreaView } from 'react-navigation';
import Items from '../components/items';
import BaseStyle from '../constants/Style';
export default class Origin extends Component {
static propTypes = {
navigation: PropTypes.object,
};
// static defaultProps = {
// };
constructor(props) {
super(props);
}
componentDidMount = () => {};
componentWillUnMount = () => {};
render() {
const {
navigation: { navigate },
} = this.props;
return (
<SafeAreaView
style={[BaseStyle.flex, styles.homebg]}
forceInset={{ top: 'never' }}>
<View style={styles.container}>
{/* list */}
<Items
LeftText={'热更新'}
RightIcon={'\ue615'}
onPress={() => {
navigate('Web', {
uri: 'https://github.com/Microsoft/react-native-code-push',
title: 'code-push',
});
}}
/>
<Items
LeftText={'推送'}
RightIcon={'\ue615'}
onPress={() => {
toast('推荐极光推送,或其他原生端集成');
}}
/>
<Items
LeftText={'百度统计'}
RightIcon={'\ue615'}
onPress={() => {
navigate('Web', {
uri: 'https://www.jianshu.com/p/7a753532830d',
title: '百度统计',
});
}}
/>
<Items
LeftText={'友盟统计'}
RightIcon={'\ue615'}
onPress={() => {
navigate('Web', {
uri: `https://jslinlink.gitee.io/blog/2018/08/31/react-native-%E5%8F%8B%E7%9B%9F%E7%BB%9F%E8%AE%A1-IOS-%E7%AB%AF%E9%9B%86%E6%88%90/`,
});
}}
/>
<Items
LeftText={'手势,指纹等'}
RightIcon={'\ue615'}
onPress={() => {
toast('敬请期待-_-');
}}
/>
</View>
</SafeAreaView>
);
}
}
const styles = StyleSheet.create({
homebg: {
backgroundColor: '#eee',
},
container: {
...BaseStyle.flex,
paddingTop: 20,
},
});