非常教程

React native参考手册

APIs

AppRegistry

需要本机代码的项目

此API仅适用于react-native init使用Create React Native App创建的项目或使用Create React Native App创建的项目,该项目已经弹出。有关弹出的更多信息,请参阅创建React Native App存储库的指南。

AppRegistry是运行所有React Native应用程序的JS入口点。应用程序根组件应该自行注册AppRegistry.registerComponent,然后本机系统可以加载该应用程序包,然后在调用准备就绪时真正运行该应用程序AppRegistry.runApplication

要在视图被销毁时“停止”应用程序,请调用AppRegistry.unmountApplicationComponentAtRootTag传入的标记runApplication。这些应该始终用作一对。

AppRegistry应该requirerequire序列的早期阶段确保JS执行环境在其他模块是required 之前设置。

方法

static setWrapperComponentProvider(provider)

static registerConfig(config)

static registerComponent(appKey, componentProvider, section?)

static registerRunnable(appKey, run)

static registerSection(appKey, component)

static getAppKeys()

static getSectionKeys()

static getSections()

static getRunnable(appKey)

static getRegistry()

static setComponentProviderInstrumentationHook(hook)

static runApplication(appKey, appParameters)

static unmountApplicationComponentAtRootTag(rootTag)

static registerHeadlessTask(taskKey, task)

注册一个无头的任务。无头的任务是一些没有UI的代码。@param taskKey与此任务关联的密钥@param任务承诺返回函数,该函数将从本机端传递的一些数据作为唯一参数; 当承诺被解决或拒绝时,本地方会收到有关此事件的通知,并可能决定销毁JS上下文。

static startHeadlessTask(taskId, taskKey, data)

只从本机代码中调用。开始一项无头的任务。

@param taskId此任务实例的本机ID以跟踪其执行情况@param taskKey任务启动的关键@参数数据要传递给任务的数据

React native

React Native 是一个 JavaScript 的框架,用来撰写实时的、可原生呈现 iOS 和 Android 的应用。

主页 https://facebook.github.io/react-native/
源码 https://github.com/facebook/react-native
发布版本 0.49

React native目录

1.开始 | Getting Started
2.指南 | Guides
3.APIs
4.组件:ActivityIndicator | Components: ActivityIndicator
5.组件:按钮 | Components: Button
6.组件:CheckBox | Components: CheckBox
7.组件:DatePickerIOS | Components: DatePickerIOS
8.组件:DrawerLayoutAndroid | Components: DrawerLayoutAndroid
9.组件:FlatList | Components: FlatList
10.组件:图像 | Components: Image
11.组件:KeyboardAvoidingView | Components: KeyboardAvoidingView
12.Components: ListView
13.Components: MaskedViewIOS
14.Components: Modal
15.Components: NavigatorIOS
16.Components: Picker
17.Components: PickerIOS
18.Components: ProgressBarAndroid
19.Components: ProgressViewIOS
20.Components: RefreshControl
21.Components: ScrollView
22.Components: SectionList
23.Components: SegmentedControlIOS
24.Components: Slider
25.Components: SnapshotViewIOS
26.Components: StatusBar
27.Components: Switch
28.Components: TabBarIOS
29.Components: TabBarIOS.Item
30.Components: Text
31.Components: TextInput
32.Components: ToolbarAndroid
33.Components: TouchableHighlight
34.Components: TouchableNativeFeedback
35.Components: TouchableOpacity
36.Components: TouchableWithoutFeedback
37.Components: View
38.Components: ViewPagerAndroid
39.Components: VirtualizedList
40.Components: WebView
41.创建 | Contributing
42.指南(Android) | Guides (Android)
43.指南(IOS) | Guides (iOS)
44.其他 | Miscellaneous