# react_native_demo
**Repository Path**: ren_yizhong/react_native_demo
## Basic Information
- **Project Name**: react_native_demo
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-07-12
- **Last Updated**: 2021-07-12
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
启动
npx react-native run-android
react na 中使用flex布局
style={{backgroundColor:'#ccc'}} style的固定写法
文字必须用text包裹
样式没有继承
没有 vw px 等单位 只有百分比
Dimensions.get('window').width 获取屏幕宽度
Dimensions.get('window').height 获取屏幕高度
view相当于div
const winWidth = Math.round(Dimensions.get('window').width)
const winHeight = Math.round(Dimensions.get('window').height)
style={{ transform: [{ translateY: 200 }, { scale: 2 }] }}> 样式的使用方法
TouchableOpacity标签 点击的 透明的标签
属性 activeOpacity = 透明度
onPress = 点击事件名称
TouchableOpacity
有背景图片的view
Inside
输入框
获取输入的值
const handleMsg = (value) => {
alert(value)
}