装包:
yarn add native-base
expo install react-native-svg@12.1.1
Index.js:
import React from 'react'
import { View, Text } from 'react-native'
import useList from './useList'
import { NativeBaseProvider, Button, Box } from 'native-base'
import styles from './styles'
export default function Home(props) {
const { title } = useList(props)
return (
<View style={styles.mMeTabsWrap}>
<Text>123</Text>
<NativeBaseProvider>
<Button onPress={() => console.log('hello world')}>Click Me</Button>
<Box>Hello world</Box>
</NativeBaseProvider>
</View>
)
}
参考链接:
https://docs.nativebase.io/install-expo文章来源:https://www.toymoban.com/news/detail-644624.html
https://chat.xutongbao.top/文章来源地址https://www.toymoban.com/news/detail-644624.html
到了这里,关于Expo项目 使用Native base UI库的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!