ActivityIndicator
Displays a circular loading indicator.
Example
-import React from 'react';
-import { ActivityIndicator, StyleSheet, View } from 'react-native';
+import React, { Component } from 'react'
+import {
+ ActivityIndicator,
+ StyleSheet,
+ Text,
+ View,
+} from 'react-native'
-export default App = () => (
- <View style={styles.container}>
- <ActivityIndicator size="large" color="#0000ff" />
- <ActivityIndicator size="small" color="#00ff00" />
- </View>
-);
+export default class App extends Component {
+ render() {
+ return (
+ <View style={[styles.container, styles.horizontal]}>
+ <ActivityIndicator size="large" color="#0000ff" />
+ <ActivityIndicator size="small" color="#00ff00" />
+ <ActivityIndicator size="large" color="#0000ff" />
+ <ActivityIndicator size="small" color="#00ff00" />
+ </View>
+ )
+ }
+}
const styles = StyleSheet.create({
container: {
flex: 1,
+ justifyContent: 'center'
+ },
+ horizontal: {
flexDirection: 'row',
- justifyContent: 'space-around'
+ justifyContent: 'space-around',
+ padding: 10
}
-});
+})
EditActivityIndicator
Displays a circular loading indicator.
Example
-import React from 'react';
-import { ActivityIndicator, StyleSheet, View } from 'react-native';
+import React, { Component } from 'react'
+import {
+ ActivityIndicator,
+ StyleSheet,
+ Text,
+ View,
+} from 'react-native'
-export default App = () => (
- <View style={styles.container}>
- <ActivityIndicator size="large" color="#0000ff" />
- <ActivityIndicator size="small" color="#00ff00" />
- </View>
-);
+export default class App extends Component {
+ render() {
+ return (
+ <View style={[styles.container, styles.horizontal]}>
+ <ActivityIndicator size="large" color="#0000ff" />
+ <ActivityIndicator size="small" color="#00ff00" />
+ <ActivityIndicator size="large" color="#0000ff" />
+ <ActivityIndicator size="small" color="#00ff00" />
+ </View>
+ )
+ }
+}
const styles = StyleSheet.create({
container: {
flex: 1,
+ justifyContent: 'center'
+ },
+ horizontal: {
flexDirection: 'row',
- justifyContent: 'space-around'
+ justifyContent: 'space-around',
+ padding: 10
}
-});
+})
CocoaPods:
Add the PushNotificationIOS library to your Podfile: ./ios/Podfile
-target 'myAwesomeApp' do
- # Pods for myAwesomeApp
- pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
-end
-
+
+``
+..
+do
+pp
+..
+S'
+...
+
Manually link the PushNotificationIOS library:
diff --git a/docs/next/pushnotificationios/index.html b/docs/next/pushnotificationios/index.html
index 26ece98dc2f..2c79d216490 100644
--- a/docs/next/pushnotificationios/index.html
+++ b/docs/next/pushnotificationios/index.html
@@ -89,11 +89,15 @@
CocoaPods:
Add the PushNotificationIOS library to your Podfile: ./ios/Podfile
-target 'myAwesomeApp' do
- # Pods for myAwesomeApp
- pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
-end
-
+
+``
+..
+do
+pp
+..
+S'
+...
+
Manually link the PushNotificationIOS library:
diff --git a/docs/next/typescript.html b/docs/next/typescript.html
index c502a0c35f9..86558510013 100644
--- a/docs/next/typescript.html
+++ b/docs/next/typescript.html
@@ -210,7 +210,7 @@ export default Hello;
- TypeScript Handbook
- React's documentation on TypeScript
-- React + TypeScript Cheatsheets has a good overview on how to use React with TypeScript
+- [React + TypeScript Cheatsheets][cheats] has a good overview on how to use React with TypeScript
Using Custom Path Aliases with TypeScript
To use custom path aliases with TypeScript, you need to set the path aliases to work from both Babel and TypeScript. Here's how:
diff --git a/docs/next/typescript/index.html b/docs/next/typescript/index.html
index c502a0c35f9..86558510013 100644
--- a/docs/next/typescript/index.html
+++ b/docs/next/typescript/index.html
@@ -210,7 +210,7 @@ export default Hello;
- TypeScript Handbook
- React's documentation on TypeScript
-- React + TypeScript Cheatsheets has a good overview on how to use React with TypeScript
+- [React + TypeScript Cheatsheets][cheats] has a good overview on how to use React with TypeScript
Using Custom Path Aliases with TypeScript
To use custom path aliases with TypeScript, you need to set the path aliases to work from both Babel and TypeScript. Here's how: