双括号:单括号包裹着一个对象
样式驼峰命名法 且不需要单位
react-native:本身使用的布局就是flex
import React, { Fragment } from 'react'
import { View, Text } from 'react-native'
const App = () =>
{
return (
<Fragment>
<View>
<Text>羽神教学时间</Text>
</View >
{/* 内外边距 */}
<View style={{ marginTop: 8, padding: 8, width: 200, backgroundColor: 'pink' }}>
<Text style={{ color: 'red' }}>羽神教学时间</Text>
</View>
<View style={{ marginTop: 8, padding: 8, width: 200, backgroundColor: 'blue' }}>
<Text style={{ color: 'white' }}>羽神教学时间</Text>
</View>
</Fragment>
)
}
export default App