React Native

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(项目)
 
(未显示1个用户的7个中间版本)
第1行: 第1行:
React Native 是一个使用 React 构建本地 App 的框架, 而 React 是一个构建用户界面的 [[JavaScript]] 库。
+
{{SeeWikipedia}}
  
 +
React Native
 +
 +
[[文件:React-Native-logo.png|right|React Native]]
 
==新闻==
 
==新闻==
 
*[https://juejin.im/post/59c58b846fb9a00a3f24eafa React、Jest、Flow 和 Immutable.js 将使用 MIT 许可证] (2017.09.22)
 
*[https://juejin.im/post/59c58b846fb9a00a3f24eafa React、Jest、Flow 和 Immutable.js 将使用 MIT 许可证] (2017.09.22)
第6行: 第9行:
  
 
==简介==
 
==简介==
 +
React Native 是一个使用 [[React.js|React]] 构建本地 App 的框架, 而 React 是一个构建用户界面的 [[JavaScript]] 库。
 +
 
React Native的核心[https://github.com/facebook/react-native/tree/master/React React]使用[[Objective-C]]编写,[https://github.com/facebook/react-native/tree/master/ReactCommon ReactCommon]和Android JNI使用[[C++]]编写,[https://github.com/facebook/react-native/tree/master/ReactAndroid ReactAndroid]使用[[Java]]编写,基础库[https://github.com/facebook/react-native/tree/master/Libraries Libraries]使用[[JavaScript]]编写。
 
React Native的核心[https://github.com/facebook/react-native/tree/master/React React]使用[[Objective-C]]编写,[https://github.com/facebook/react-native/tree/master/ReactCommon ReactCommon]和Android JNI使用[[C++]]编写,[https://github.com/facebook/react-native/tree/master/ReactAndroid ReactAndroid]使用[[Java]]编写,基础库[https://github.com/facebook/react-native/tree/master/Libraries Libraries]使用[[JavaScript]]编写。
  
==安装==
+
React Native 支持[[WebSocket]],这种协议可以在单个 TCP 连接上提供全双工的通信信道。
 +
 
 +
==指南==
 
  curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
 
  curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
 
  nvm install iojs-v2 && nvm alias default iojs-v2
 
  nvm install iojs-v2 && nvm alias default iojs-v2
第15行: 第22行:
 
  npm install -g react-native-cli
 
  npm install -g react-native-cli
 
  react-native init AwesomeProject
 
  react-native init AwesomeProject
 +
npm start
 +
xcrun simctl list devices
 +
react-native run-ios --simulator="iPhone 6s"
  
 
==问题==
 
==问题==
第23行: 第33行:
  
 
==项目==
 
==项目==
*[https://github.com/infinitered/ignite Ignite CLI] [https://github.com/jondot/awesome-react-native#Seeds 更多Seeds]
+
[[文件:Awesome-React-Native.png|right|Awesome React Native]]
 +
*[https://github.com/facebook/react-native React Native @ GitHub]
 +
*[https://github.com/jondot/awesome-react-native Awesome React Native] [[image:awesome.png]]
 +
*[https://github.com/infinitered/ignite Ignite] 是一套整合了 Redux 以及一些常见 UI 组件的脚手架。[https://github.com/jondot/awesome-react-native#Seeds 更多Seeds]
 
*[https://github.com/react-community/ React Community] [https://github.com/react-community/create-react-native-app Create React Native App]
 
*[https://github.com/react-community/ React Community] [https://github.com/react-community/create-react-native-app Create React Native App]
 
*[https://github.com/fbsamples/f8app F8 App] [http://makeitopen.com/ makeitopen.com · Building the F8 App]
 
*[https://github.com/fbsamples/f8app F8 App] [http://makeitopen.com/ makeitopen.com · Building the F8 App]
第37行: 第50行:
 
*[https://github.com/Microsoft/code-push CodePush]
 
*[https://github.com/Microsoft/code-push CodePush]
 
[https://github.com/dkhamsing/open-source-ios-apps#react-native >>>更多Apps]
 
[https://github.com/dkhamsing/open-source-ios-apps#react-native >>>更多Apps]
 +
 +
==工具==
 +
*[https://microsoft.github.io/code-push/ CodePush]是由微软提供的热更新服务。热更新可以使你绕过 AppStore 的审核机制,直接修改已经上架的应用。
 +
*[https://expo.io/ Expo]是一套沙盒开发环境,还带有一个已上架的空应用容器。这样你可以在没有原生开发平台(Xcode 或是 Android Studio)的情况下直接编写 React Native 应用(你只能写 js 部分代码,而没法写原生代码)。
  
 
==用户==
 
==用户==
第51行: 第68行:
 
<gallery>
 
<gallery>
 
image:react-native-huihoo.png|Hello
 
image:react-native-huihoo.png|Hello
 +
image:react-native-components.png|组件
 
</gallery>
 
</gallery>
  
 
==链接==
 
==链接==
*[https://github.com/facebook/react-native React Native @ GitHub]
+
*[https://reactnative.dev/ React Native]
*[https://github.com/jondot/awesome-react-native Awesome React Native] [[image:awesome.png]]
+
  
 +
[[category:mobile]]
 
[[category:javaScript]]
 
[[category:javaScript]]
 
[[category:react]]
 
[[category:react]]
 
[[category:iOS]]
 
[[category:iOS]]
 
[[category:facebook]]
 
[[category:facebook]]

2022年4月17日 (日) 02:27的最后版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 React Native Thanks, Wikipedia.

React Native

React Native

目录

[编辑] 新闻

[编辑] 简介

React Native 是一个使用 React 构建本地 App 的框架, 而 React 是一个构建用户界面的 JavaScript 库。

React Native的核心React使用Objective-C编写,ReactCommon和Android JNI使用C++编写,ReactAndroid使用Java编写,基础库Libraries使用JavaScript编写。

React Native 支持WebSocket,这种协议可以在单个 TCP 连接上提供全双工的通信信道。

[编辑] 指南

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
nvm install iojs-v2 && nvm alias default iojs-v2
brew install watchman
brew install flow
npm install -g react-native-cli
react-native init AwesomeProject
npm start
xcrun simctl list devices
react-native run-ios --simulator="iPhone 6s"

[编辑] 问题

xcrun: error: unable to find utility “instruments”, not a developer tool or in PATH

$ sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/

Print: Entry, ":CFBundleIdentifier", Does Not Exist

$ react-native upgrade

[编辑] 项目

Awesome React Native

>>>更多Apps

[编辑] 工具

  • CodePush是由微软提供的热更新服务。热更新可以使你绕过 AppStore 的审核机制,直接修改已经上架的应用。
  • Expo是一套沙盒开发环境,还带有一个已上架的空应用容器。这样你可以在没有原生开发平台(Xcode 或是 Android Studio)的情况下直接编写 React Native 应用(你只能写 js 部分代码,而没法写原生代码)。

[编辑] 用户

  • Facebook iOS和Android版
  • Instagram iOS和Android版
  • QQ安卓版
  • 手机京东 iOS和Android版
  • 手机百度 iOS和Android版
  • Airbnb iOS和Android版
  • Tesla iOS和Android版
  • Huiseoul (惠首尔) Building a conversational E-commerce app in 6 weeks with React Native

[编辑] 图集

[编辑] 链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱