Expo项目 使用Native base UI库

装包:

yarn add native-base

expo install [email protected]  

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://chat.xutongbao.top/

猜你喜欢

转载自blog.csdn.net/xutongbao/article/details/132257538