React Native

React Native 將 React 宣告式 UI 框架帶到 iOS 和 Android。使用 React Native,你可以使用原生 UI 控制項,並完全存取原生平台。

React Native 由許多公司和個人核心貢獻者開發與支援。在我們的 生態系統概覽 中了解更多。

使用範例

jsx
import {View, Text} from 'react-native';
import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';

const ViewBoxesWithColorAndText = () => {
  return (
    <SafeAreaProvider>
      <SafeAreaView style={{flexDirection: 'row'}}>
        <View style={{height: 100, backgroundColor: 'blue', flex: 0.2}} />
        <View style={{height: 100, backgroundColor: 'red', flex: 0.4}} />
        <Text>Hello World!</Text>
      </SafeAreaView>
    </SafeAreaProvider>
  );
};

export default ViewBoxesWithColorAndText;

https://snack.expo.dev/?description=Example%20usage&deviceFrame=false&hideQueryParams=true&name=View%20Example&platform=ios

生態圈專案

這些開源專案把目前專案作為所屬生態圈,可一起觀察它的實際使用場景。

SHARE

分享

分享這個開源專案。

JavaScript 框架