diff --git a/docs/Accessibility.md b/docs/Accessibility.md
index 9ff6e18..6e8dfe3 100644
--- a/docs/Accessibility.md
+++ b/docs/Accessibility.md
@@ -1,14 +1,10 @@
---
id: accessibility
title: Accessibility
-layout: docs
-category: Guides
-permalink: docs/accessibility.html
-next: timers
-previous: animations
---
## Native App Accessibility (iOS and Android)
+
Both iOS and Android provide APIs for making apps accessible to people with disabilities. In addition, both platforms provide bundled assistive technologies, like the screen readers VoiceOver (iOS) and TalkBack (Android) for the visually impaired. Similarly, in React Native we have included APIs designed to provide developers with support for making apps more accessible. Take note, iOS and Android differ slightly in their approaches, and thus the React Native implementations may vary by platform.
In addition to this documentation, you might find [this blog post](https://code.facebook.com/posts/435862739941212/making-react-native-apps-accessible/) about React Native accessibility to be useful.
@@ -21,7 +17,7 @@ In addition to this documentation, you might find [this blog post](https://code.
When `true`, indicates that the view is an accessibility element. When a view is an accessibility element, it groups its children into a single selectable component. By default, all touchable elements are accessible.
-On Android, ‘accessible={true}’ property for a react-native View will be translated into native ‘focusable={true}’.
+On Android, `accessible={true}` property for a react-native View will be translated into native `focusable={true}`.
```javascript
@@ -32,16 +28,17 @@ On Android, ‘accessible={true}’ property for a react-native View will be tra
In the above example, we can't get accessibility focus separately on 'text one' and 'text two'. Instead we get focus on a parent view with 'accessible' property.
-
-
#### accessibilityLabel (iOS, Android)
When a view is marked as accessible, it is a good practice to set an accessibilityLabel on the view, so that people who use VoiceOver know what element they have selected. VoiceOver will read this string when a user selects the associated element.
-To use, set the `accessibilityLabel` property to a custom string on your View:
+To use, set the `accessibilityLabel` property to a custom string on your View, Text or Touchable:
```javascript
-
+Press me!
@@ -50,8 +47,65 @@ To use, set the `accessibilityLabel` property to a custom string on your View:
In the above example, the `accessibilityLabel` on the TouchableOpacity element would default to "Press me!". The label is constructed by concatenating all Text node children separated by spaces.
+#### accessibilityHint (iOS, Android)
+
+An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.
+
+To use, set the `accessibilityHint` property to a custom string on your View, Text or Touchable:
+
+```javascript
+
+
+ Back
+
+
+```
+
+iOS In the above example, VoiceOver will read the hint after the label, if the user has hints enabled in the device's VoiceOver settings. Read more about guidelines for accessibilityHint in the [iOS Developer Docs](https://developer.apple.com/documentation/objectivec/nsobject/1615093-accessibilityhint)
+
+Android In the above example, Talkback will read the hint after the label. At this time, hints cannot be turned off on Android.
+
+#### accessibilityIgnoresInvertColors(iOS)
+
+Inverting screen colors is an Accessibility feature that makes the iPhone and iPad easier on the eyes for some people with a sensitivity to brightness, easier to distinguish for some people with color blindness, and easier to make out for some people with low vision. However, sometimes you have views such as photos that you don't want to be inverted. In this case, you can set this property to be false so that these specific views won't have their colors inverted.
+
+#### accessibilityRole (iOS, Android)
+
+> **Note:** Accessibility Role and Accessibility States are meant to be a cross-platform solution to replace `accessibilityTraits` and `accessibilityComponentType`, which will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead of `accessibilityTraits` and `accessibilityComponentType`.
+
+Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on. To use, set the `accessibilityRole` property to one of the following strings:
+
+* **none** Used when the element has no role.
+* **button** Used when the element should be treated as a button.
+* **link** Used when the element should be treated as a link.
+* **search** Used when the text field element should also be treated as a search field.
+* **image** Used when the element should be treated as an image. Can be combined with button or link, for example.
+* **keyboardkey** Used when the element acts as a keyboard key.
+* **text** Used when the element should be treated as static text that cannot change.
+* **adjustable** Used when an element can be "adjusted" (e.g. a slider).
+* **imagebutton** Used when the element should be treated as a button and is also an image.
+* **header** Used when an element acts as a header for a content section (e.g. the title of a navigation bar).
+* **summary** Used when an element can be used to provide a quick summary of current conditions in the app when the app first launches.
+
+#### accessibilityStates (iOS, Android)
+
+> **Note:** > `accessibilityRole` and `accessibilityStates` are meant to be a cross-platform solution to replace `accessibilityTraits` and `accessibilityComponentType`, which will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead of `accessibilityTraits` and `accessibilityComponentType`.
+
+Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on. The state of the element can be set either to `selected` or `disabled` or both:
+
+* **selected** Used when the element is in a selected state. For example, a button is selected.
+* **disabled** Used when the element is disabled and cannot be interacted with.
+
+To use, set the `accessibilityStates` to an array containing either `selected`, `disabled`, or both.
+
#### accessibilityTraits (iOS)
+> **Note:** `accessibilityTraits` will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead of `accessibilityTraits` and `accessibilityComponentType`.
+
Accessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by `accessibilityTraits`.
To use, set the `accessibilityTraits` property to one of (or an array of) accessibility trait strings:
@@ -62,11 +116,11 @@ To use, set the `accessibilityTraits` property to one of (or an array of) access
* **header** Used when an element acts as a header for a content section (e.g. the title of a navigation bar).
* **search** Used when the text field element should also be treated as a search field.
* **image** Used when the element should be treated as an image. Can be combined with button or link, for example.
-* **selected** Used when the element is selected. For example, a selected row in a table or a selected button within a segmented control.
+* **selected** Used when the element is selected. For example, a selected row in a table or a selected button within a segmented control.
* **plays** Used when the element plays its own sound when activated.
* **key** Used when the element acts as a keyboard key.
* **text** Used when the element should be treated as static text that cannot change.
-* **summary** Used when an element can be used to provide a quick summary of current conditions in the app when the app first launches. For example, when Weather first launches, the element with today's weather conditions is marked with this trait.
+* **summary** Used when an element can be used to provide a quick summary of current conditions in the app when the app first launches. For example, when Weather first launches, the element with today's weather conditions is marked with this trait.
* **disabled** Used when the control is not enabled and does not respond to user input.
* **frequentUpdates** Used when the element frequently updates its label or value, but too often to send notifications. Allows an accessibility client to poll for changes. A stopwatch would be an example.
* **startsMedia** Used when activating an element starts a media session (e.g. playing a movie, recording audio) that should not be interrupted by output from an assistive technology, like VoiceOver.
@@ -78,8 +132,13 @@ To use, set the `accessibilityTraits` property to one of (or an array of) access
A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver.
-For example, in a window that contains sibling views `A` and `B`, setting `accessibilityViewIsModal` to `true` on view `B` causes VoiceOver to ignore the elements in the view `A`.
-On the other hand, if view `B` contains a child view `C` and you set `accessibilityViewIsModal` to `true` on view `C`, VoiceOver does not ignore the elements in view `A`.
+For example, in a window that contains sibling views `A` and `B`, setting `accessibilityViewIsModal` to `true` on view `B` causes VoiceOver to ignore the elements in the view `A`. On the other hand, if view `B` contains a child view `C` and you set `accessibilityViewIsModal` to `true` on view `C`, VoiceOver does not ignore the elements in view `A`.
+
+#### accessibilityElementsHidden (iOS)
+
+A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden.
+
+For example, in a window that contains sibling views `A` and `B`, setting `accessibilityElementsHidden` to `true` on view `B` causes VoiceOver to ignore the elements in the view `B`. This is similar to the Android property `importantForAccessibility="no-hide-descendants"`.
#### onAccessibilityTap (iOS)
@@ -89,9 +148,15 @@ Use this property to assign a custom function to be called when someone activate
Assign this property to a custom function which will be called when someone performs the "magic tap" gesture, which is a double-tap with two fingers. A magic tap function should perform the most relevant action a user could take on a component. In the Phone app on iPhone, a magic tap answers a phone call, or ends the current one. If the selected element does not have an `onMagicTap` function, the system will traverse up the view hierarchy until it finds a view that does.
+#### onAccessibilityEscape (iOS)
+
+Assign this property to a custom function which will be called when someone performs the "escape" gesture, which is a two finger Z shaped gesture. An escape function should move back hierarchically in the user interface. This can mean moving up or back in a navigation hierarchy or dismissing a modal user interface. If the selected element does not have an `onAccessibilityEscape` function, the system will attempt to traverse up the view hierarchy until it finds a view that does or bonk to indicate it was unable to find one.
+
#### accessibilityComponentType (Android)
-In some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on.
+> **Note:** > `accessibilityComponentType` will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead of `accessibilityTraits` and `accessibilityComponentType`.
+
+In some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. We support 'none', ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’.
```javascript
```
-In the above example method _addOne changes the state.count variable. As soon as an end user clicks the TouchableWithoutFeedback, TalkBack reads text in the Text view because of its 'accessibilityLiveRegion=”polite”' property.
+In the above example method \_addOne changes the state.count variable. As soon as an end user clicks the TouchableWithoutFeedback, TalkBack reads text in the Text view because of its 'accessibilityLiveRegion=”polite”' property.
#### importantForAccessibility (Android)
@@ -146,31 +211,37 @@ In the above example, the yellow layout and its descendants are completely invis
### Checking if a Screen Reader is Enabled
-The `AccessibilityInfo` API allows you to determine whether or not a screen reader is currently active. See the [AccessibilityInfo documentation](docs/accessibilityinfo.html) for details.
+The `AccessibilityInfo` API allows you to determine whether or not a screen reader is currently active. See the [AccessibilityInfo documentation](accessibilityinfo.md) for details.
### Sending Accessibility Events (Android)
Sometimes it is useful to trigger an accessibility event on a UI component (i.e. when a custom view appears on a screen or a custom radio button has been selected). Native UIManager module exposes a method ‘sendAccessibilityEvent’ for this purpose. It takes two arguments: view tag and a type of an event.
```javascript
+import { UIManager, findNodeHandle } from 'react-native';
+
_onPress: function() {
- this.state.radioButton = this.state.radioButton === “radiobutton_checked” ?
- “radiobutton_unchecked” : “radiobutton_checked”;
- if (this.state.radioButton === “radiobutton_checked”) {
- RCTUIManager.sendAccessibilityEvent(
- ReactNative.findNodeHandle(this),
- RCTUIManager.AccessibilityEventTypes.typeViewClicked);
+ const radioButton = this.state.radioButton === 'radiobutton_checked' ?
+ 'radiobutton_unchecked' : 'radiobutton_checked'
+
+ this.setState({
+ radioButton: radioButton
+ });
+
+ if (radioButton === 'radiobutton_checked') {
+ UIManager.sendAccessibilityEvent(
+ findNodeHandle(this),
+ UIManager.AccessibilityEventTypes.typeViewClicked);
}
}
```
In the above example we've created a custom radio button that now behaves like a native one. More specifically, TalkBack now correctly announces changes to the radio button selection.
-
## Testing VoiceOver Support (iOS)
To enable VoiceOver, go to the Settings app on your iOS device. Tap General, then Accessibility. There you will find many tools that people use to make their devices more usable, such as bolder text, increased contrast, and VoiceOver.
diff --git a/docs/Animations.md b/docs/Animations.md
index ad93309..b269a2b 100644
--- a/docs/Animations.md
+++ b/docs/Animations.md
@@ -1,26 +1,15 @@
---
id: animations
title: Animations
-layout: docs
-category: Guides
-permalink: docs/animations.html
-next: accessibility
-previous: images
---
-Animations are very important to create a great user experience.
-Stationary objects must overcome inertia as they start moving.
-Objects in motion have momentum and rarely come to a stop immediately.
-Animations allow you to convey physically believable motion in your interface.
+Animations are very important to create a great user experience. Stationary objects must overcome inertia as they start moving. Objects in motion have momentum and rarely come to a stop immediately. Animations allow you to convey physically believable motion in your interface.
-React Native provides two complementary animation systems:
-[`Animated`](docs/animations.html#animated-api) for granular and interactive control of specific values, and
-[`LayoutAnimation`](docs/animations.html#layoutanimation) for animated global layout transactions.
+React Native provides two complementary animation systems: [`Animated`](animations.md#animated-api) for granular and interactive control of specific values, and [`LayoutAnimation`](animations.md#layoutanimation-api) for animated global layout transactions.
## `Animated` API
-The [`Animated`](docs/animated.html) API is designed to make it very easy to concisely express a wide variety of interesting animation and interaction patterns in a very performant way.
-`Animated` focuses on declarative relationships between inputs and outputs, with configurable transforms in between, and simple `start`/`stop` methods to control time-based animation execution.
+The [`Animated`](animated.md) API is designed to make it very easy to concisely express a wide variety of interesting animation and interaction patterns in a very performant way. `Animated` focuses on declarative relationships between inputs and outputs, with configurable transforms in between, and simple `start`/`stop` methods to control time-based animation execution.
`Animated` exports four animatable component types: `View`, `Text`, `Image`, and `ScrollView`, but you can also create your own using `Animated.createAnimatedComponent()`.
@@ -75,14 +64,9 @@ export default class App extends React.Component {
}
```
-Let's break down what's happening here.
-In the `FadeInView` constructor, a new `Animated.Value` called `fadeAnim` is initialized as part of `state`.
-The opacity property on the `View` is mapped to this animated value.
-Behind the scenes, the numeric value is extracted and used to set opacity.
+Let's break down what's happening here. In the `FadeInView` constructor, a new `Animated.Value` called `fadeAnim` is initialized as part of `state`. The opacity property on the `View` is mapped to this animated value. Behind the scenes, the numeric value is extracted and used to set opacity.
-When the component mounts, the opacity is set to 0.
-Then, an easing animation is started on the `fadeAnim` animated value,
-which will update all of its dependent mappings (in this case, just the opacity) on each frame as the value animates to the final value of 1.
+When the component mounts, the opacity is set to 0. Then, an easing animation is started on the `fadeAnim` animated value, which will update all of its dependent mappings (in this case, just the opacity) on each frame as the value animates to the final value of 1.
This is done in an optimized way that is faster than calling `setState` and re-rendering.
Because the entire configuration is declarative, we will be able to implement further optimizations that serialize the configuration and runs the animation on a high-priority thread.
@@ -91,70 +75,61 @@ Because the entire configuration is declarative, we will be able to implement fu
Animations are heavily configurable. Custom and predefined easing functions, delays, durations, decay factors, spring constants, and more can all be tweaked depending on the type of animation.
-`Animated` provides several animation types, the most commonly used one being [`Animated.timing()`](docs/animated.html#timing).
-It supports animating a value over time using one of various predefined easing functions, or you can use your own.
-Easing functions are typically used in animation to convey gradual acceleration and deceleration of objects.
+`Animated` provides several animation types, the most commonly used one being [`Animated.timing()`](animated.md#timing). It supports animating a value over time using one of various predefined easing functions, or you can use your own. Easing functions are typically used in animation to convey gradual acceleration and deceleration of objects.
-By default, `timing` will use a easeInOut curve that conveys gradual acceleration to full speed and concludes by gradually decelerating to a stop.
-You can specify a different easing function by passing a `easing` parameter.
-Custom `duration` or even a `delay` before the animation starts is also supported.
+By default, `timing` will use a easeInOut curve that conveys gradual acceleration to full speed and concludes by gradually decelerating to a stop. You can specify a different easing function by passing a `easing` parameter. Custom `duration` or even a `delay` before the animation starts is also supported.
For example, if we want to create a 2-second long animation of an object that slightly backs up before moving to its final position:
```javascript
-Animated.timing(
- this.state.xPosition,
- {
- toValue: 100,
- easing: Easing.back,
- duration: 2000,
- }
-).start();
+Animated.timing(this.state.xPosition, {
+ toValue: 100,
+ easing: Easing.back(),
+ duration: 2000,
+}).start();
```
-Take a look at the [Configuring animations](docs/animated.html#configuring-animations) section of the `Animated` API reference to learn more about all the config parameters supported by the built-in animations.
+Take a look at the [Configuring animations](animated.md#configuring-animations) section of the `Animated` API reference to learn more about all the config parameters supported by the built-in animations.
### Composing animations
-Animations can be combined and played in sequence or in parallel.
-Sequential animations can play immediately after the previous animation has finished,
-or they can start after a specified delay.
-The `Animated` API provides several methods, such as `sequence()` and `delay()`,
-each of which simply take an array of animations to execute and automatically calls `start()`/`stop()` as needed.
+Animations can be combined and played in sequence or in parallel. Sequential animations can play immediately after the previous animation has finished, or they can start after a specified delay. The `Animated` API provides several methods, such as `sequence()` and `delay()`, each of which simply take an array of animations to execute and automatically calls `start()`/`stop()` as needed.
For example, the following animation coasts to a stop, then it springs back while twirling in parallel:
```javascript
-Animated.sequence([ // decay, then spring to start and twirl
- Animated.decay(position, { // coast to a stop
+Animated.sequence([
+ // decay, then spring to start and twirl
+ Animated.decay(position, {
+ // coast to a stop
velocity: {x: gestureState.vx, y: gestureState.vy}, // velocity from gesture release
deceleration: 0.997,
}),
- Animated.parallel([ // after decay, in parallel:
+ Animated.parallel([
+ // after decay, in parallel:
Animated.spring(position, {
- toValue: {x: 0, y: 0} // return to start
+ toValue: {x: 0, y: 0}, // return to start
}),
- Animated.timing(twirl, { // and twirl
+ Animated.timing(twirl, {
+ // and twirl
toValue: 360,
}),
]),
-]).start(); // start the sequence group
+]).start(); // start the sequence group
```
-If one animation is stopped or interrupted, then all other animations in the group are also stopped.
-`Animated.parallel` has a `stopTogether` option that can be set to `false` to disable this.
+If one animation is stopped or interrupted, then all other animations in the group are also stopped. `Animated.parallel` has a `stopTogether` option that can be set to `false` to disable this.
-You can find a full list of composition methods in the [Composing animations](docs/animated.html#composing-animations) section of the `Animated` API reference.
+You can find a full list of composition methods in the [Composing animations](animated.md#composing-animations) section of the `Animated` API reference.
### Combining animated values
-You can [combine two animated values](docs/animated.html#combining-animated-values) via addition, multiplication, division, or modulo to make a new animated value.
+You can [combine two animated values](animated.md#combining-animated-values) via addition, multiplication, division, or modulo to make a new animated value.
-There are some cases where an animated value needs to invert another animated value for calculation.
-An example is inverting a scale (2x --> 0.5x):
+There are some cases where an animated value needs to invert another animated value for calculation. An example is inverting a scale (2x --> 0.5x):
```javascript
-const a = Animated.Value(1);
+const a = new Animated.Value(1);
const b = Animated.divide(1, a);
Animated.spring(a, {
@@ -164,10 +139,7 @@ Animated.spring(a, {
### Interpolation
-Each property can be run through an interpolation first.
-An interpolation maps input ranges to output ranges,
-typically using a linear interpolation but also supports easing functions.
-By default, it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value.
+Each property can be run through an interpolation first. An interpolation maps input ranges to output ranges, typically using a linear interpolation but also supports easing functions. By default, it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value.
A simple mapping to convert a 0-1 range to a 0-100 range would be:
@@ -178,9 +150,7 @@ value.interpolate({
});
```
-For example, you may want to think about your `Animated.Value` as going from 0 to 1,
-but animate the position from 150px to 0px and the opacity from 0 to 1.
-This can easily be done by modifying `style` from the example above like so:
+For example, you may want to think about your `Animated.Value` as going from 0 to 1, but animate the position from 150px to 0px and the opacity from 0 to 1. This can easily be done by modifying `style` from the example above like so:
```javascript
style={{
@@ -194,13 +164,12 @@ This can easily be done by modifying `style` from the example above like so:
}}
```
-[`interpolate()`](docs/animated.html#interpolate) supports multiple range segments as well, which is handy for defining dead zones and other handy tricks.
-For example, to get an negation relationship at -300 that goes to 0 at -100, then back up to 1 at 0, and then back down to zero at 100 followed by a dead-zone that remains at 0 for everything beyond that, you could do:
+[`interpolate()`](animated.md#interpolate) supports multiple range segments as well, which is handy for defining dead zones and other handy tricks. For example, to get a negation relationship at -300 that goes to 0 at -100, then back up to 1 at 0, and then back down to zero at 100 followed by a dead-zone that remains at 0 for everything beyond that, you could do:
```javascript
value.interpolate({
inputRange: [-300, -100, 0, 100, 101],
- outputRange: [300, 0, 1, 0, 0],
+ outputRange: [300, 0, 1, 0, 0],
});
```
@@ -226,22 +195,15 @@ Input | Output
```javascript
value.interpolate({
inputRange: [0, 360],
- outputRange: ['0deg', '360deg']
-})
+ outputRange: ['0deg', '360deg'],
+});
```
-`interpolate()` also supports arbitrary easing functions, many of which are already implemented in the
-[`Easing`](docs/easing.html) module.
-`interpolate()` also has configurable behavior for extrapolating the `outputRange`.
-You can set the extrapolation by setting the `extrapolate`, `extrapolateLeft`, or `extrapolateRight` options.
-The default value is `extend` but you can use `clamp` to prevent the output value from exceeding `outputRange`.
+`interpolate()` also supports arbitrary easing functions, many of which are already implemented in the [`Easing`](easing.md) module. `interpolate()` also has configurable behavior for extrapolating the `outputRange`. You can set the extrapolation by setting the `extrapolate`, `extrapolateLeft`, or `extrapolateRight` options. The default value is `extend` but you can use `clamp` to prevent the output value from exceeding `outputRange`.
### Tracking dynamic values
-Animated values can also track other values.
-Just set the `toValue` of an animation to another animated value instead of a plain number.
-For example, a "Chat Heads" animation like the one used by Messenger on Android could be implemented with a `spring()` pinned on another animated value, or with `timing()` and a `duration` of 0 for rigid tracking.
-They can also be composed with interpolations:
+Animated values can also track other values. Just set the `toValue` of an animation to another animated value instead of a plain number. For example, a "Chat Heads" animation like the one used by Messenger on Android could be implemented with a `spring()` pinned on another animated value, or with `timing()` and a `duration` of 0 for rigid tracking. They can also be composed with interpolations:
```javascript
Animated.spring(follower, {toValue: leader}).start();
@@ -253,20 +215,13 @@ Animated.timing(opacity, {
}).start();
```
-The `leader` and `follower` animated values would be implemented using `Animated.ValueXY()`.
-`ValueXY` is a handy way to deal with 2D interactions, such as panning or dragging.
-It is a simple wrapper that basically contains two `Animated.Value` instances and some helper functions that call through to them,
-making `ValueXY` a drop-in replacement for `Value` in many cases.
-It allows us to track both x and y values in the example above.
+The `leader` and `follower` animated values would be implemented using `Animated.ValueXY()`. `ValueXY` is a handy way to deal with 2D interactions, such as panning or dragging. It is a simple wrapper that basically contains two `Animated.Value` instances and some helper functions that call through to them, making `ValueXY` a drop-in replacement for `Value` in many cases. It allows us to track both x and y values in the example above.
### Tracking gestures
-Gestures, like panning or scrolling, and other events can map directly to animated values using [`Animated.event`](docs/animated.html#event).
-This is done with a structured map syntax so that values can be extracted from complex event objects.
-The first level is an array to allow mapping across multiple args, and that array contains nested objects.
+Gestures, like panning or scrolling, and other events can map directly to animated values using [`Animated.event`](animated.md#event). This is done with a structured map syntax so that values can be extracted from complex event objects. The first level is an array to allow mapping across multiple args, and that array contains nested objects.
-For example, when working with horizontal scrolling gestures,
-you would do the following in order to map `event.nativeEvent.contentOffset.x` to `scrollX` (an `Animated.Value`):
+For example, when working with horizontal scrolling gestures, you would do the following in order to map `event.nativeEvent.contentOffset.x` to `scrollX` (an `Animated.Value`):
```javascript
onScroll={Animated.event(
@@ -280,9 +235,7 @@ you would do the following in order to map `event.nativeEvent.contentOffset.x` t
)}
```
-When using `PanResponder`, you could use the following code to extract the x and y positions from `gestureState.dx` and `gestureState.dy`.
-We use a `null` in the first position of the array, as we are only interested in the second argument passed to the `PanResponder` handler,
-which is the `gestureState`.
+When using `PanResponder`, you could use the following code to extract the x and y positions from `gestureState.dx` and `gestureState.dy`. We use a `null` in the first position of the array, as we are only interested in the second argument passed to the `PanResponder` handler, which is the `gestureState`.
```javascript
onPanResponderMove={Animated.event(
@@ -295,31 +248,18 @@ onPanResponderMove={Animated.event(
### Responding to the current animation value
-You may notice that there is no obvious way to read the current value while animating.
-This is because the value may only be known in the native runtime due to optimizations.
-If you need to run JavaScript in response to the current value, there are two approaches:
+You may notice that there is no obvious way to read the current value while animating. This is because the value may only be known in the native runtime due to optimizations. If you need to run JavaScript in response to the current value, there are two approaches:
-- `spring.stopAnimation(callback)` will stop the animation and invoke `callback` with the final value. This is useful when making gesture transitions.
-- `spring.addListener(callback)` will invoke `callback` asynchronously while the animation is running, providing a recent value.
- This is useful for triggering state changes,
- for example snapping a bobble to a new option as the user drags it closer,
- because these larger state changes are less sensitive to a few frames of lag compared to continuous gestures like panning which need to run at 60 fps.
+* `spring.stopAnimation(callback)` will stop the animation and invoke `callback` with the final value. This is useful when making gesture transitions.
+* `spring.addListener(callback)` will invoke `callback` asynchronously while the animation is running, providing a recent value. This is useful for triggering state changes, for example snapping a bobble to a new option as the user drags it closer, because these larger state changes are less sensitive to a few frames of lag compared to continuous gestures like panning which need to run at 60 fps.
-`Animated` is designed to be fully serializable so that animations can be run in a high performance way, independent of the normal JavaScript event loop.
-This does influence the API, so keep that in mind when it seems a little trickier to do something compared to a fully synchronous system.
-Check out `Animated.Value.addListener` as a way to work around some of these limitations,
-but use it sparingly since it might have performance implications in the future.
+`Animated` is designed to be fully serializable so that animations can be run in a high performance way, independent of the normal JavaScript event loop. This does influence the API, so keep that in mind when it seems a little trickier to do something compared to a fully synchronous system. Check out `Animated.Value.addListener` as a way to work around some of these limitations, but use it sparingly since it might have performance implications in the future.
### Using the native driver
-The `Animated` API is designed to be serializable.
-By using the [native driver](http://facebook.github.io/react-native/blog/2017/02/14/using-native-driver-for-animated.html),
-we send everything about the animation to native before starting the animation,
-allowing native code to perform the animation on the UI thread without having to go through the bridge on every frame.
-Once the animation has started, the JS thread can be blocked without affecting the animation.
+The `Animated` API is designed to be serializable. By using the [native driver](http://facebook.github.io/react-native/blog/2017/02/14/using-native-driver-for-animated.html), we send everything about the animation to native before starting the animation, allowing native code to perform the animation on the UI thread without having to go through the bridge on every frame. Once the animation has started, the JS thread can be blocked without affecting the animation.
-Using the native driver for normal animations is quite simple.
-Just add `useNativeDriver: true` to the animation config when starting it.
+Using the native driver for normal animations is quite simple. Just add `useNativeDriver: true` to the animation config when starting it.
```javascript
Animated.timing(this.state.animatedValue, {
@@ -329,64 +269,69 @@ Animated.timing(this.state.animatedValue, {
}).start();
```
-Animated values are only compatible with one driver so if you use native driver when starting an animation on a value,
-make sure every animation on that value also uses the native driver.
+Animated values are only compatible with one driver so if you use native driver when starting an animation on a value, make sure every animation on that value also uses the native driver.
-The native driver also works with `Animated.event`.
-This is specially useful for animations that follow the scroll position as without the native driver,
-the animation will always run a frame behind the gesture due to the async nature of React Native.
+The native driver also works with `Animated.event`. This is especially useful for animations that follow the scroll position as without the native driver, the animation will always run a frame behind the gesture due to the async nature of React Native.
```javascript
+ [
+ {
+ nativeEvent: {
+ contentOffset: {y: this.state.animatedValue},
+ },
+ },
+ ],
+ {useNativeDriver: true}, // <-- Add this
+ )}>
{content}
```
-You can see the native driver in action by running the [RNTester app](https://github.com/facebook/react-native/blob/master/RNTester/),
-then loading the Native Animated Example.
-You can also take a look at the [source code](https://github.com/facebook/react-native/blob/master/RNTester/js/NativeAnimationsExample.js) to learn how these examples were produced.
+You can see the native driver in action by running the [RNTester app](https://github.com/facebook/react-native/blob/master/RNTester/), then loading the Native Animated Example. You can also take a look at the [source code](https://github.com/facebook/react-native/blob/master/RNTester/js/NativeAnimationsExample.js) to learn how these examples were produced.
#### Caveats
-Not everything you can do with `Animated` is currently supported by the native driver.
-The main limitation is that you can only animate non-layout properties:
-things like `transform` and `opacity` will work, but flexbox and position properties will not.
-When using `Animated.event`, it will only work with direct events and not bubbling events.
-This means it does not work with `PanResponder` but does work with things like `ScrollView#onScroll`.
+Not everything you can do with `Animated` is currently supported by the native driver. The main limitation is that you can only animate non-layout properties: things like `transform` and `opacity` will work, but flexbox and position properties will not. When using `Animated.event`, it will only work with direct events and not bubbling events. This means it does not work with `PanResponder` but does work with things like `ScrollView#onScroll`.
+
+When an animation is running, it can prevent `VirtualizedList` components from rendering more rows. If you need to run a long or looping animation while the user is scrolling through a list, you can use `isInteraction: false` in your animation's config to prevent this issue.
+
+### Bear in mind
+
+While using transform styles such as `rotateY`, `rotateX`, and others ensure the transform style `perspective` is in place. At this time some animations may not render on Android without it. Example below.
+
+```javascript
+
+```
### Additional examples
The RNTester app has various examples of `Animated` in use:
-- [AnimatedGratuitousApp](https://github.com/facebook/react-native/tree/master/RNTester/js/AnimatedGratuitousApp)
-- [NativeAnimationsExample](https://github.com/facebook/react-native/blob/master/RNTester/js/NativeAnimationsExample.js)
+* [AnimatedGratuitousApp](https://github.com/facebook/react-native/tree/master/RNTester/js/AnimatedGratuitousApp)
+* [NativeAnimationsExample](https://github.com/facebook/react-native/blob/master/RNTester/js/NativeAnimationsExample.js)
## `LayoutAnimation` API
-`LayoutAnimation` allows you to globally configure `create` and `update`
-animations that will be used for all views in the next render/layout cycle.
-This is useful for doing flexbox layout updates without bothering to measure or
-calculate specific properties in order to animate them directly, and is
-especially useful when layout changes may affect ancestors, for example a "see
-more" expansion that also increases the size of the parent and pushes down the
-row below which would otherwise require explicit coordination between the
-components in order to animate them all in sync.
+`LayoutAnimation` allows you to globally configure `create` and `update` animations that will be used for all views in the next render/layout cycle. This is useful for doing flexbox layout updates without bothering to measure or calculate specific properties in order to animate them directly, and is especially useful when layout changes may affect ancestors, for example a "see more" expansion that also increases the size of the parent and pushes down the row below which would otherwise require explicit coordination between the components in order to animate them all in sync.
-Note that although `LayoutAnimation` is very powerful and can be quite useful,
-it provides much less control than `Animated` and other animation libraries, so
-you may need to use another approach if you can't get `LayoutAnimation` to do
-what you want.
+Note that although `LayoutAnimation` is very powerful and can be quite useful, it provides much less control than `Animated` and other animation libraries, so you may need to use another approach if you can't get `LayoutAnimation` to do what you want.
Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:
```javascript
-UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
+UIManager.setLayoutAnimationEnabledExperimental &&
+ UIManager.setLayoutAnimationEnabledExperimental(true);
```
```SnackPlayer
@@ -455,39 +400,18 @@ const styles = StyleSheet.create({
});
```
-This example uses a preset value, you can customize the animations as
-you need, see [LayoutAnimation.js](https://github.com/facebook/react-native/blob/master/Libraries/LayoutAnimation/LayoutAnimation.js)
-for more information.
+This example uses a preset value, you can customize the animations as you need, see [LayoutAnimation.js](https://github.com/facebook/react-native/blob/master/Libraries/LayoutAnimation/LayoutAnimation.js) for more information.
## Additional notes
### `requestAnimationFrame`
-`requestAnimationFrame` is a polyfill from the browser that you might be
-familiar with. It accepts a function as its only argument and calls that
-function before the next repaint. It is an essential building block for
-animations that underlies all of the JavaScript-based animation APIs. In
-general, you shouldn't need to call this yourself - the animation APIs will
-manage frame updates for you.
+`requestAnimationFrame` is a polyfill from the browser that you might be familiar with. It accepts a function as its only argument and calls that function before the next repaint. It is an essential building block for animations that underlies all of the JavaScript-based animation APIs. In general, you shouldn't need to call this yourself - the animation APIs will manage frame updates for you.
### `setNativeProps`
-As mentioned [in the Direction Manipulation section](docs/direct-manipulation.html),
-`setNativeProps` allows us to modify properties of native-backed
-components (components that are actually backed by native views, unlike
-composite components) directly, without having to `setState` and
-re-render the component hierarchy.
-
-We could use this in the Rebound example to update the scale - this
-might be helpful if the component that we are updating is deeply nested
-and hasn't been optimized with `shouldComponentUpdate`.
-
-If you find your animations with dropping frames (performing below 60 frames
-per second), look into using `setNativeProps` or `shouldComponentUpdate` to
-optimize them. Or you could run the animations on the UI thread rather than
-the JavaScript thread [with the useNativeDriver
-option](http://facebook.github.io/react-native/blog/2017/02/14/using-native-driver-for-animated.html).
-You may also want to defer any computationally intensive work until after
-animations are complete, using the
-[InteractionManager](docs/interactionmanager.html). You can monitor the
-frame rate by using the In-App Developer Menu "FPS Monitor" tool.
+As mentioned [in the Direct Manipulation section](direct-manipulation.md), `setNativeProps` allows us to modify properties of native-backed components (components that are actually backed by native views, unlike composite components) directly, without having to `setState` and re-render the component hierarchy.
+
+We could use this in the Rebound example to update the scale - this might be helpful if the component that we are updating is deeply nested and hasn't been optimized with `shouldComponentUpdate`.
+
+If you find your animations with dropping frames (performing below 60 frames per second), look into using `setNativeProps` or `shouldComponentUpdate` to optimize them. Or you could run the animations on the UI thread rather than the JavaScript thread [with the useNativeDriver option](http://facebook.github.io/react-native/blog/2017/02/14/using-native-driver-for-animated.html). You may also want to defer any computationally intensive work until after animations are complete, using the [InteractionManager](interactionmanager.md). You can monitor the frame rate by using the In-App Developer Menu "FPS Monitor" tool.
diff --git a/docs/Debugging.md b/docs/Debugging.md
index 1b7b4c8..74399ee 100644
--- a/docs/Debugging.md
+++ b/docs/Debugging.md
@@ -1,11 +1,6 @@
---
id: debugging
title: Debugging
-layout: docs
-category: Guides
-permalink: docs/debugging.html
-next: performance
-previous: timers
---
## Enabling Keyboard Shortcuts
@@ -14,9 +9,9 @@ React Native supports a few keyboard shortcuts in the iOS Simulator. They are de
## Accessing the In-App Developer Menu
-You can access the developer menu by shaking your device or by selecting "Shake Gesture" inside the Hardware menu in the iOS Simulator. You can also use the `⌘D` keyboard shortcut when your app is running in the iOS Simulator, or `⌘M` when running in an Android emulator.
+You can access the developer menu by shaking your device or by selecting "Shake Gesture" inside the Hardware menu in the iOS Simulator. You can also use the `⌘D` keyboard shortcut when your app is running in the iOS Simulator, or `⌘M` when running in an Android emulator on Mac OS and `Ctrl+M` on Windows and Linux. Alternatively for Android, you can run the command `adb shell input keyevent 82` to open the dev menu (82 being the Menu key code).
-
+
> The Developer Menu is disabled in release (production) builds.
@@ -51,7 +46,12 @@ Warnings will be displayed on screen with a yellow background. These alerts are
As with a RedBox, you can use `console.warn()` to trigger a YellowBox.
-YellowBoxes can be disabled during development by using `console.disableYellowBox = true;`. Specific warnings can be ignored programmatically by setting an array of prefixes that should be ignored: `console.ignoredYellowBox = ['Warning: ...'];`.
+YellowBoxes can be disabled during development by using `console.disableYellowBox = true;`. Specific warnings can be ignored programmatically by setting an array of prefixes that should be ignored:
+
+```javascript
+import {YellowBox} from 'react-native';
+YellowBox.ignoreWarnings(['Warning: ...']);
+```
In CI/Xcode, YellowBoxes can also be disabled by setting the `IS_TESTING` environment variable.
@@ -63,7 +63,7 @@ To debug the JavaScript code in Chrome, select "Debug JS Remotely" from the Deve
Select `Tools → Developer Tools` from the Chrome Menu to open the [Developer Tools](https://developer.chrome.com/devtools). You may also access the DevTools using keyboard shortcuts (`⌘⌥I` on macOS, `Ctrl` `Shift` `I` on Windows). You may also want to enable [Pause On Caught Exceptions](http://stackoverflow.com/questions/2233339/javascript-is-there-a-way-to-get-chrome-to-break-on-all-errors/17324511#17324511) for a better debugging experience.
-> Note: the React Developer Tools Chrome extension does not work with React Native, but you can use its standalone version instead. Read [this section](docs/debugging.html#react-developer-tools) to learn how.
+> Note: the React Developer Tools Chrome extension does not work with React Native, but you can use its standalone version instead. Read [this section](debugging.md#react-developer-tools) to learn how.
### Debugging using a custom JavaScript debugger
@@ -73,6 +73,19 @@ The debugger will receive a list of all project roots, separated by a space. For
> Custom debugger commands executed this way should be short-lived processes, and they shouldn't produce more than 200 kilobytes of output.
+## Safari Developer Tools
+
+You can use Safari to debug the iOS version of your app without having to enable "Debug JS Remotely".
+
+* Enable Develop menu in Safari: `Preferences → Advanced → Select "Show Develop menu in menu bar"`
+* Select your app's JSContext: `Develop → Simulator → JSContext`
+* Safari's Web Inspector should open which has a Console and a Debugger
+
+However, there are some disadvantages:
+
+1. No sourcemaps when debugging
+2. Every time the app is reloaded (using live reload, or by manually reloading), a new JSContext is created. Choosing "Automatically Show Web Inspectors for JSContexts" saves you from having to select the latest JSContext manually.
+
## React Developer Tools
You can use [the standalone version of React Developer Tools](https://github.com/facebook/react-devtools/tree/master/packages/react-devtools) to debug the React component hierarchy. To use it, install the `react-devtools` package globally:
@@ -87,7 +100,7 @@ Now run `react-devtools` from the terminal to launch the standalone DevTools app
react-devtools
```
-
+
It should connect to your simulator within a few seconds.
@@ -95,15 +108,15 @@ It should connect to your simulator within a few seconds.
### Integration with React Native Inspector
-Open the in-app developer menu and choose "Show Inspector". It will bring up an overlay that lets you tap on any UI element and see information about it:
+Open the in-app developer menu and choose "Toggle Inspector". It will bring up an overlay that lets you tap on any UI element and see information about it:
-
+
However, when `react-devtools` is running, Inspector will enter a special collapsed mode, and instead use the DevTools as primary UI. In this mode, clicking on something in the simulator will bring up the relevant components in the DevTools:
-
+
-You can choose "Hide Inspector" in the same menu to exit this mode.
+You can choose "Toggle Inspector" in the same menu to exit this mode.
### Inspecting Component Instances
@@ -115,7 +128,7 @@ Make sure that the dropdown in the top left corner of the Chrome console says `d
Then select a React component in React DevTools. There is a search box at the top that helps you find one by name. As soon as you select it, it will be available as `$r` in the Chrome console, letting you inspect its props, state, and instance properties.
-
+
## Performance Monitor
@@ -129,7 +142,7 @@ You can enable a performance overlay to help you debug performance problems by s
Projects with Native Code Only
The remainder of this guide only applies to projects made with react-native init
- or to those made with Create React Native App which have since ejected. For
+ or to those made with expo init or Create React Native App which have since ejected. For
more information about ejecting, please see
the guide on
the Create React Native App repository.
@@ -147,11 +160,11 @@ $ react-native log-android
You may also access these through `Debug → Open System Log...` in the iOS Simulator or by running `adb logcat *:S ReactNative:V ReactNativeJS:V` in a terminal while an Android app is running on a device or emulator.
-> If you're using Create React Native App, console logs already appear in the same terminal output as the packager.
+> If you're using Create React Native App or Expo CLI, console logs already appear in the same terminal output as the packager.
## Debugging on a device with Chrome Developer Tools
-> If you're using Create React Native App, this is configured for you already.
+> If you're using Create React Native App or Expo CLI, this is configured for you already.
On iOS devices, open the file [`RCTWebSocketExecutor.m`](https://github.com/facebook/react-native/blob/master/Libraries/WebSocket/RCTWebSocketExecutor.m) and change "localhost" to the IP address of your computer, then select "Debug JS Remotely" from the Developer Menu.
@@ -163,46 +176,6 @@ Alternatively, select "Dev Settings" from the Developer Menu, then update the "D
> If you run into any issues, it may be possible that one of your Chrome extensions is interacting in unexpected ways with the debugger. Try disabling all of your extensions and re-enabling them one-by-one until you find the problematic extension.
-### Debugging with [Stetho](http://facebook.github.io/stetho/) on Android
-
-1. In ```android/app/build.gradle```, add these lines in the `dependencies` section:
-
- ```gradle
- compile 'com.facebook.stetho:stetho:1.3.1'
- compile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
- ```
-
-2. In ```android/app/src/main/java/com/{yourAppName}/MainApplication.java```, add the following imports:
-
- ```java
- import com.facebook.react.modules.network.ReactCookieJarContainer;
- import com.facebook.stetho.Stetho;
- import okhttp3.OkHttpClient;
- import com.facebook.react.modules.network.OkHttpClientProvider;
- import com.facebook.stetho.okhttp3.StethoInterceptor;
- import java.util.concurrent.TimeUnit;
- ```
-
-3. In ```android/app/src/main/java/com/{yourAppName}/MainApplication.java``` add the function:
- ```java
- public void onCreate() {
- super.onCreate();
- Stetho.initializeWithDefaults(this);
- OkHttpClient client = new OkHttpClient.Builder()
- .connectTimeout(0, TimeUnit.MILLISECONDS)
- .readTimeout(0, TimeUnit.MILLISECONDS)
- .writeTimeout(0, TimeUnit.MILLISECONDS)
- .cookieJar(new ReactCookieJarContainer())
- .addNetworkInterceptor(new StethoInterceptor())
- .build();
- OkHttpClientProvider.replaceOkHttpClient(client);
- }
- ```
-
-4. Run ```react-native run-android ```
-
-5. In a new Chrome tab, open: ```chrome://inspect```, then click on 'Inspect device' (the one followed by "Powered by Stetho").
-
## Debugging native code
When working with native code, such as when writing native modules, you can launch the app from Android Studio or Xcode and take advantage of the native debugging features (setting up breakpoints, etc.) as you would in case of building a standard native app.
diff --git a/docs/Images.md b/docs/Images.md
index 9de79b6..e448fae 100644
--- a/docs/Images.md
+++ b/docs/Images.md
@@ -1,11 +1,6 @@
---
id: images
title: Images
-layout: docs
-category: Guides
-permalink: docs/images.html
-next: animations
-previous: navigation
---
## Static Image Resources
@@ -24,6 +19,7 @@ You can also use the `@2x` and `@3x` suffixes to provide images for different sc
.
├── button.js
└── img
+ ├── check.png
├── check@2x.png
└── check@3x.png
```
@@ -52,89 +48,121 @@ In order for this to work, the image name in `require` has to be known staticall
```javascript
// GOOD
-
+;
// BAD
var icon = this.props.active ? 'my-icon-active' : 'my-icon-inactive';
-
+;
// GOOD
-var icon = this.props.active ? require('./my-icon-active.png') : require('./my-icon-inactive.png');
-
+var icon = this.props.active
+ ? require('./my-icon-active.png')
+ : require('./my-icon-inactive.png');
+;
```
Note that image sources required this way include size (width, height) info for the Image. If you need to scale the image dynamically (i.e. via flex), you may need to manually set `{ width: undefined, height: undefined }` on the style attribute.
## Static Non-Image Resources
-The `require` syntax described above can be used to statically include audio, video or document files in your project as well. Most common file types are supported including `.mp3`, `.wav`, `.mp4`, `.mov`, `.html` and `.pdf` (see the [packager defaults](https://github.com/facebook/react-native/blob/master/packager/defaults.js) file for the full list).
+The `require` syntax described above can be used to statically include audio, video or document files in your project as well. Most common file types are supported including `.mp3`, `.wav`, `.mp4`, `.mov`, `.html` and `.pdf`. See [packager defaults](https://github.com/facebook/metro/blob/master/packages/metro-config/src/defaults/defaults.js#L14-L44) for the full list.
+
+You can add support for other types by creating a packager config file (see the [packager config file](https://github.com/facebook/react-native/blob/master/local-cli/util/Config.js#L68) for the full list of configuration options).
A caveat is that videos must use absolute positioning instead of `flexGrow`, since size info is not currently passed for non-image assets. This limitation doesn't occur for videos that are linked directly into Xcode or the Assets folder for Android.
## Images From Hybrid App's Resources
-If you are building a hybrid app (some UIs in React Native, some UIs in platform code) you can still use images that are already bundled into the app (via Xcode asset catalogs or Android drawable folder):
+If you are building a hybrid app (some UIs in React Native, some UIs in platform code) you can still use images that are already bundled into the app.
+
+For images included via Xcode asset catalogs or in the Android drawable folder, use the image name without the extension:
```javascript
```
-This approach provides no safety checks. It's up to you to guarantee that those images are available in the application. Also you have to specify image dimensions manually.
+For images in the Android assets folder, use the `asset:/` scheme:
+```javascript
+
+```
+
+These approaches provide no safety checks. It's up to you to guarantee that those images are available in the application. Also you have to specify image dimensions manually.
## Network Images
-Many of the images you will display in your app will not be available at compile time, or you will want to load some dynamically to keep the binary size down. Unlike with static resources, *you will need to manually specify the dimensions of your image*. It's highly recommended that you use https as well in order to satisfy [App Transport Security](docs/running-on-device.html#app-transport-security) requirements on iOS.
+Many of the images you will display in your app will not be available at compile time, or you will want to load some dynamically to keep the binary size down. Unlike with static resources, _you will need to manually specify the dimensions of your image_. It's highly recommended that you use https as well in order to satisfy [App Transport Security](running-on-device.md#app-transport-security) requirements on iOS.
```javascript
// GOOD
-
// BAD
-
+
```
### Network Requests for Images
- If you would like to set such things as the HTTP-Verb, Headers or a Body along with the image request, you may do this by defining these properties on the source object:
+If you would like to set such things as the HTTP-Verb, Headers or a Body along with the image request, you may do this by defining these properties on the source object:
+
+```javascript
+
+```
- ```javascript
-
- ```
+## Uri Data Images
+
+Sometimes, you might be getting encoded image data from a REST API call. You can use the `'data:'` uri scheme to use these images. Same as for network resources, _you will need to manually specify the dimensions of your image_.
+
+> This is recommended for very small and dynamic images only, like icons in a list from a DB.
+
+```javascript
+// include at least width and height!
+
+```
### Cache Control (iOS Only)
In some cases you might only want to display an image if it is already in the local cache, i.e. a low resolution placeholder until a higher resolution is available. In other cases you do not care if the image is outdated and are willing to display an outdated image to save bandwidth. The `cache` source property gives you control over how the network layer interacts with the cache.
* `default`: Use the native platforms default strategy.
-* `reload`: The data for the URL will be loaded from the originating source.
-No existing cache data should be used to satisfy a URL load request.
-* `force-cache`: The existing cached data will be used to satisfy the request,
-regardless of its age or expiration date. If there is no existing data in the cache
-corresponding the request, the data is loaded from the originating source.
-* `only-if-cached`: The existing cache data will be used to satisfy a request, regardless of
-its age or expiration date. If there is no existing data in the cache corresponding
-to a URL load request, no attempt is made to load the data from the originating source,
-and the load is considered to have failed.
+* `reload`: The data for the URL will be loaded from the originating source. No existing cache data should be used to satisfy a URL load request.
+* `force-cache`: The existing cached data will be used to satisfy the request, regardless of its age or expiration date. If there is no existing data in the cache corresponding the request, the data is loaded from the originating source.
+* `only-if-cached`: The existing cache data will be used to satisfy a request, regardless of its age or expiration date. If there is no existing data in the cache corresponding to a URL load request, no attempt is made to load the data from the originating source, and the load is considered to have failed.
```javascript
-
+
```
## Local Filesystem Images
-See [CameraRoll](docs/cameraroll.html) for an example of
-using local resources that are outside of `Images.xcassets`.
+See [CameraRoll](cameraroll.md) for an example of using local resources that are outside of `Images.xcassets`.
### Best Camera Roll Image
@@ -142,9 +170,9 @@ iOS saves multiple sizes for the same image in your Camera Roll, it is very impo
## Why Not Automatically Size Everything?
-*In the browser* if you don't give a size to an image, the browser is going to render a 0x0 element, download the image, and then render the image based with the correct size. The big issue with this behavior is that your UI is going to jump all around as images load, this makes for a very bad user experience.
+_In the browser_ if you don't give a size to an image, the browser is going to render a 0x0 element, download the image, and then render the image based with the correct size. The big issue with this behavior is that your UI is going to jump all around as images load, this makes for a very bad user experience.
-*In React Native* this behavior is intentionally not implemented. It is more work for the developer to know the dimensions (or aspect ratio) of the remote image in advance, but we believe that it leads to a better user experience. Static images loaded from the app bundle via the `require('./my-icon.png')` syntax *can be automatically sized* because their dimensions are available immediately at the time of mounting.
+_In React Native_ this behavior is intentionally not implemented. It is more work for the developer to know the dimensions (or aspect ratio) of the remote image in advance, but we believe that it leads to a better user experience. Static images loaded from the app bundle via the `require('./my-icon.png')` syntax _can be automatically sized_ because their dimensions are available immediately at the time of mounting.
For example, the result of `require('./my-icon.png')` might be:
@@ -166,16 +194,20 @@ On the user side, this lets you annotate the object with useful attributes such
## Background Image via Nesting
-A common feature request from developers familiar with the web is `background-image`. To handle this use case, simply create a normal `` component and add whatever children to it you would like to layer on top of it.
+A common feature request from developers familiar with the web is `background-image`. To handle this use case, you can use the `` component, which has the same props as ``, and add whatever children to it you would like to layer on top of it.
+
+You might not want to use `` in some cases, since the implementation is very simple. Refer to ``'s [documentation](imagebackground.md) for more insight, and create your own custom component when needed.
```javascript
return (
-
+ Inside
-
+
);
```
+Note that you must specify some width and height style attributes.
+
## iOS Border Radius Styles
Please note that the following corner specific, border radius style properties are currently ignored by iOS's image component:
diff --git a/docs/Navigation.md b/docs/Navigation.md
index fd0dfb3..7e6d8e2 100644
--- a/docs/Navigation.md
+++ b/docs/Navigation.md
@@ -1,21 +1,13 @@
---
id: navigation
title: Navigating Between Screens
-layout: docs
-category: Guides
-permalink: docs/navigation.html
-next: images
-previous: platform-specific-code
---
Mobile apps are rarely made up of a single screen. Managing the presentation of, and transition between, multiple screens is typically handled by what is known as a navigator.
-This guide covers the various navigation components available in React Native.
-If you are just getting started with navigation, you will probably want to use [React Navigation](docs/navigation.html#react-navigation). React Navigation provides an easy to use navigation solution, with the ability to present common stack navigation and tabbed navigation patterns on both iOS and Android. As this is a JavaScript implementation, it provides the greatest amount of configurability as well as flexibility when integrating with state management libraries such as [redux](https://reactnavigation.org/docs/guides/redux).
+This guide covers the various navigation components available in React Native. If you are just getting started with navigation, you will probably want to use [React Navigation](navigation.md#react-navigation). React Navigation provides an easy to use navigation solution, with the ability to present common stack navigation and tabbed navigation patterns on both iOS and Android.
-If you're only targeting iOS, you may want to also check out [NavigatorIOS](docs/navigation.html#navigatorios) as a way of providing a native look and feel with minimal configuration, as it provides a wrapper around the native `UINavigationController` class. This component will not work on Android, however.
-
-If you'd like to achieve a native look and feel on both iOS and Android, or you're integrating React Native into an app that already manages navigation natively, the following libraries provide native navigation on both platforms: [native-navigation](http://airbnb.io/native-navigation/), [react-native-navigation](https://github.com/wix/react-native-navigation).
+If you'd like to achieve a native look and feel on both iOS and Android, or you're integrating React Native into an app that already manages navigation natively, the following library provides native navigation on both platforms: [react-native-navigation](https://github.com/wix/react-native-navigation).
## React Navigation
@@ -29,112 +21,40 @@ npm install --save react-navigation
Then you can quickly create an app with a home screen and a profile screen:
-```
-import {
- StackNavigator,
-} from 'react-navigation';
+```javascript
+import {createStackNavigator, createAppContainer} from 'react-navigation';
-const App = StackNavigator({
- Home: { screen: HomeScreen },
- Profile: { screen: ProfileScreen },
+const MainNavigator = createStackNavigator({
+ Home: {screen: HomeScreen},
+ Profile: {screen: ProfileScreen},
});
+
+const App = createAppContainer(MainNavigator);
+
+export default App;
```
Each screen component can set navigation options such as the header title. It can use action creators on the `navigation` prop to link to other screens:
-```
+```javascript
class HomeScreen extends React.Component {
static navigationOptions = {
title: 'Welcome',
};
render() {
- const { navigate } = this.props.navigation;
+ const {navigate} = this.props.navigation;
return (
// View container: each text is its own block
+// |First part and|
+// |second part |
+
+// otherwise, the text will flow in its own block
// |First part |
// |and |
// |second part|
@@ -88,7 +119,6 @@ The `` element is special relative to layout: everything inside is no long
On the web, the usual way to set a font family and size for the entire document is to take advantage of inherited CSS properties like so:
```css
-/* CSS, *not* React Native */
html {
font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
font-size: 11px;
@@ -98,7 +128,7 @@ html {
All elements in the document will inherit this font unless they or one of their parents specifies a new rule.
-In React Native, we are more strict about it: **you must wrap all the text nodes inside of a `` component**; you cannot have a text node directly under a ``.
+In React Native, we are more strict about it: **you must wrap all the text nodes inside of a `` component**. You cannot have a text node directly under a ``.
```javascript
// BAD: will raise exception, can't have a text node as child of a
@@ -114,11 +144,13 @@ In React Native, we are more strict about it: **you must wrap all the text nodes
```
-You also lose the ability to set up a default font for an entire subtree. The recommended way to use consistent fonts and sizes across your application is to create a component `MyAppText` that includes them and use this component across your app. You can also use this component to make more specific components like `MyAppHeaderText` for other kinds of text.
+You also lose the ability to set up a default font for an entire subtree. Meanwhile, `fontFamily` only accepts a single font name, which is different from `font-family` in CSS. The recommended way to use consistent fonts and sizes across your application is to create a component `MyAppText` that includes them and use this component across your app. You can also use this component to make more specific components like `MyAppHeaderText` for other kinds of text.
```javascript
- Text styled with the default font for the entire application
+
+ Text styled with the default font for the entire application
+ Text styled as a header
```
@@ -128,11 +160,11 @@ Assuming that `MyAppText` is a component that simply renders out its children in
```javascript
class MyAppHeaderText extends Component {
render() {
-
-
- {this.props.children}
-
-
+ return (
+
+ {this.props.children}
+
+ );
}
}
```
@@ -144,14 +176,327 @@ React Native still has the concept of style inheritance, but limited to text sub
```javascript
I am bold
-
- and red
-
+ and red
```
We believe that this more constrained way to style text will yield better apps:
-- (Developer) React components are designed with strong isolation in mind: You should be able to drop a component anywhere in your application, trusting that as long as the props are the same, it will look and behave the same way. Text properties that could inherit from outside of the props would break this isolation.
+* (Developer) React components are designed with strong isolation in mind: You should be able to drop a component anywhere in your application, trusting that as long as the props are the same, it will look and behave the same way. Text properties that could inherit from outside of the props would break this isolation.
+
+* (Implementor) The implementation of React Native is also simplified. We do not need to have a `fontFamily` field on every single element, and we do not need to potentially traverse the tree up to the root every time we display a text node. The style inheritance is only encoded inside of the native Text component and doesn't leak to other components or the system itself.
+
+### Props
+
+* [`selectable`](text.md#selectable)
+* [`accessibilityHint`](text.md#accessibilityhint)
+* [`accessibilityLabel`](text.md#accessibilitylabel)
+* [`accessible`](text.md#accessible)
+* [`ellipsizeMode`](text.md#ellipsizemode)
+* [`nativeID`](text.md#nativeid)
+* [`numberOfLines`](text.md#numberoflines)
+* [`onLayout`](text.md#onlayout)
+* [`onLongPress`](text.md#onlongpress)
+* [`onPress`](text.md#onpress)
+* [`pressRetentionOffset`](text.md#pressretentionoffset)
+* [`allowFontScaling`](text.md#allowfontscaling)
+* [`maxFontSizeMultiplier`](text.md#maxfontsizemultiplier)
+* [`style`](text.md#style)
+* [`testID`](text.md#testid)
+* [`disabled`](text.md#disabled)
+* [`selectionColor`](text.md#selectioncolor)
+* [`textBreakStrategy`](text.md#textbreakstrategy)
+* [`adjustsFontSizeToFit`](text.md#adjustsfontsizetofit)
+* [`minimumFontScale`](text.md#minimumfontscale)
+* [`suppressHighlighting`](text.md#suppresshighlighting)
+
+---
+
+# Reference
+
+## Props
+
+### `selectable`
+
+Lets the user select text, to use the native copy and paste functionality.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `accessibilityHint`
+
+An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `accessibilityLabel`
+
+Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the `Text` nodes separated by space.
+
+| Type | Required |
+| ---- | -------- |
+| node | No |
+
+---
+
+### `accessible`
+
+When set to `true`, indicates that the view is an accessibility element. The default value for a `Text` element is `true`.
+
+See the [Accessibility guide](accessibility.md#accessible-ios-android) for more information.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `ellipsizeMode`
+
+When `numberOfLines` is set, this prop defines how text will be truncated. `numberOfLines` must be set in conjunction with this prop.
+
+This can be one of the following values:
+
+* `head` - The line is displayed so that the end fits in the container and the missing text at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz"
+* `middle` - The line is displayed so that the beginning and end fit in the container and the missing text in the middle is indicated by an ellipsis glyph. "ab...yz"
+* `tail` - The line is displayed so that the beginning fits in the container and the missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..."
+* `clip` - Lines are not drawn past the edge of the text container.
+
+The default is `tail`.
+
+| Type | Required |
+| -------------------------------------- | -------- |
+| enum('head', 'middle', 'tail', 'clip') | No |
+
+---
+
+### `nativeID`
+
+Used to locate this view from native code.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `numberOfLines`
+
+Used to truncate the text with an ellipsis after computing the text layout, including line wrapping, such that the total number of lines does not exceed this number.
+
+This prop is commonly used with `ellipsizeMode`.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `onLayout`
+
+Invoked on mount and layout changes with
+
+`{nativeEvent: {layout: {x, y, width, height}}}`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLongPress`
+
+This function is called on long press.
+
+e.g., `onLongPress={this.increaseSize}>`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onPress`
+
+This function is called on press.
+
+e.g., `onPress={() => console.log('1st')}`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `pressRetentionOffset`
+
+When the scroll view is disabled, this defines how far your touch may move off of the button, before deactivating the button. Once deactivated, try moving it back and you'll see that the button is once again reactivated! Move it back and forth several times while the scroll view is disabled. Ensure you pass in a constant to reduce memory allocations.
+
+| Type | Required |
+| ------------------------------------------------------------------ | -------- |
+| object: {top: number, left: number, bottom: number, right: number} | No |
+
+---
+
+### `allowFontScaling`
+
+Specifies whether fonts should scale to respect Text Size accessibility settings. The default is `true`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `maxFontSizeMultiplier`
+
+Specifies largest possible scale a font can reach when `allowFontScaling` is enabled. Possible values:
+
+* `null/undefined` (default): inherit from the parent node or the global default (0)
+* `0`: no max, ignore parent/global default
+* `>= 1`: sets the `maxFontSizeMultiplier` of this node to this value
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `style`
+
+| Type | Required |
+| ----- | -------- |
+| style | No |
+
+* [View Style Props...](view-style-props.md#style)
+
+* **`textShadowOffset`**: object: {width: number,height: number}
+
+* **`color`**: [color](colors.md)
+
+* **`fontSize`**: number
+
+* **`fontStyle`**: enum('normal', 'italic')
+
+* **`fontWeight`**: enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')
+
+ Specifies font weight. The values 'normal' and 'bold' are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen.
+
+* **`lineHeight`**: number
+
+* **`textAlign`**: enum('auto', 'left', 'right', 'center', 'justify')
+
+ Specifies text alignment. The value 'justify' is only supported on iOS and fallbacks to `left` on Android.
+
+* **`textDecorationLine`**: enum('none', 'underline', 'line-through', 'underline line-through')
+
+* **`textShadowColor`**: [color](colors.md)
+
+* **`fontFamily`**: string
+
+* **`textShadowRadius`**: number
+
+* **`includeFontPadding`**: bool (_Android_)
+
+ Set to `false` to remove extra font padding intended to make space for certain ascenders / descenders. With some fonts, this padding can make text look slightly misaligned when centered vertically. For best results also set `textAlignVertical` to `center`. Default is true.
+
+- **`textAlignVertical`**: enum('auto', 'top', 'bottom', 'center') (_Android_)
+
+- **`fontVariant`**: array of enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') (_iOS_)
+
+- **`letterSpacing`**: number
+
+ Increase or decrease the spacing between characters. The default is 0, for no extra letter spacing.
+
+ iOS: The additional space will be rendered after each glyph.
+
+ Android: Only supported since Android 5.0 - older versions will ignore this attribute. Please note that additional space will be added _around_ the glyphs (half on each side), which differs from the iOS rendering. It is possible to emulate the iOS rendering by using layout attributes, e.g. negative margins, as appropriate for your situation.
+
+- **`textDecorationColor`**: [color](colors.md) (_iOS_)
+
+- **`textDecorationStyle`**: enum('solid', 'double', 'dotted', 'dashed') (_iOS_)
+
+- **`textTransform`**: enum('none', 'uppercase', 'lowercase', 'capitalize')
+
+- **`writingDirection`**: enum('auto', 'ltr', 'rtl') (_iOS_)
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `disabled`
+
+Specifies the disabled state of the text view for testing purposes
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `selectionColor`
+
+The highlight color of the text.
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | Android |
+
+---
+
+### `textBreakStrategy`
+
+Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced` The default value is `highQuality`.
+
+| Type | Required | Platform |
+| ----------------------------------------- | -------- | -------- |
+| enum('simple', 'highQuality', 'balanced') | No | Android |
+
+---
+
+### `adjustsFontSizeToFit`
+
+Specifies whether font should be scaled down automatically to fit given style constraints.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `minimumFontScale`
+
+Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | iOS |
+
+---
+
+### `suppressHighlighting`
+
+When `true`, no visual change is made when text is pressed down. By default, a gray oval highlights the text on press down.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+# Known issues
-- (Implementor) The implementation of React Native is also simplified. We do not need to have a `fontFamily` field on every single element, and we do not need to potentially traverse the tree up to the root every time we display a text node. The style inheritance is only encoded inside of the native Text component and doesn't leak to other components or the system itself.
+* [react-native#22811](https://github.com/facebook/react-native/issues/22811): Nested Text elements do not support `numberOfLines` attribute
diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md
index 6f8eb2b..c5a9f7b 100644
--- a/docs/Troubleshooting.md
+++ b/docs/Troubleshooting.md
@@ -1,9 +1,6 @@
---
id: troubleshooting
title: Troubleshooting
-layout: docs
-category: Quick Start
-permalink: docs/troubleshooting.html
---
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here, try [searching for the issue in GitHub](https://github.com/facebook/react-native/issues/).
@@ -14,7 +11,7 @@ The React Native packager runs on port 8081. If another process is already using
#### Terminating a process on port 8081
-Run the following command on a Mac to find the id for the process that is listening on port 8081:
+Run the following command to find the id for the process that is listening on port 8081:
```
$ sudo lsof -i :8081
@@ -36,7 +33,7 @@ You can configure the packager to use a port other than 8081 by using the `port`
$ react-native start --port=8088
```
-You will also need to update your applications to load the JavaScript bundle from the new port.
+You will also need to update your applications to load the JavaScript bundle from the new port. If running on device from Xcode, you can do this by updating occurrences of `8081` to your chosen port in the `node_modules/react-native/React/React.xcodeproj/project.pbxproj` file.
### NPM locking error
@@ -49,7 +46,7 @@ sudo chown -R $USER /usr/local/lib/node_modules
### Missing libraries for React
-If you added React Native manually to your project, make sure you have included all the relevant dependencies that you are using, like `RCTText.xcodeproj`, `RCTImage.xcodeproj`. Next, the binaries built by these dependencies have to be linked to your app binary. Use the `Linked Frameworks and Binaries` section in the Xcode project settings. More detailed steps are here: [Linking Libraries](docs/linking-libraries-ios.html#content).
+If you added React Native manually to your project, make sure you have included all the relevant dependencies that you are using, like `RCTText.xcodeproj`, `RCTImage.xcodeproj`. Next, the binaries built by these dependencies have to be linked to your app binary. Use the `Linked Frameworks and Binaries` section in the Xcode project settings. More detailed steps are here: [Linking Libraries](linking-libraries-ios.md#content).
If you are using CocoaPods, verify that you have added React along with the subspecs to the `Podfile`. For example, if you were using the ``, `` and `fetch()` APIs, you would need to add these in your `Podfile`:
@@ -64,6 +61,10 @@ pod 'React', :path => '../node_modules/react-native', :subspecs => [
Next, make sure you have run `pod install` and that a `Pods/` directory has been created in your project with React installed. CocoaPods will instruct you to use the generated `.xcworkspace` file henceforth to be able to use these installed dependencies.
+#### React Native does not compile when being used as a CocoaPod
+
+There is a CocoaPods plugin called [cocoapods-fix-react-native](https://github.com/orta/cocoapods-fix-react-native) which handles any potential post-fixing of the source code due to differences when using a dependency manager.
+
#### Argument list too long: recursive header expansion failed
In the project's build settings, `User Search Header Paths` and `Header Search Paths` are two configs that specify where Xcode should look for `#import` header files specified in the code. For Pods, CocoaPods uses a default array of specific folders to look in. Verify that this particular config is not overwritten, and that none of the folders configured are too large. If one of the folders is a large folder, Xcode will attempt to recursively search the entire directory and throw above error at some point.
@@ -99,9 +100,11 @@ react-native init --verbose
```
## Unable to start react-native package manager (on Linux)
+
### Case 1: Error "code":"ENOSPC","errno":"ENOSPC"
Issue caused by the number of directories [inotify](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers) (used by watchman on Linux) can monitor. To solve it, just run this command in your terminal window
+
```
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
```
diff --git a/docs/Upgrading.md b/docs/Upgrading.md
index 1f6c33a..48f7f85 100644
--- a/docs/Upgrading.md
+++ b/docs/Upgrading.md
@@ -1,64 +1,53 @@
---
id: upgrading
title: Upgrading to new React Native versions
-layout: docs
-category: Guides
-permalink: docs/upgrading.html
-next: testing
-previous: running-on-device
---
-Upgrading to new versions of React Native will give you access to more APIs, views, developer tools and other goodies. Upgrading requires a small amount of effort, but we try to make it easy for you. The instructions are a bit different depending on whether you used `create-react-native-app` or `react-native init` to create your project.
+Upgrading to new versions of React Native will give you access to more APIs, views, developer tools and other goodies. Upgrading requires a small amount of effort, but we try to make it easy for you.
-## Create React Native App projects
+## Expo projects
-Upgrading your Create React Native App project to a new version of React Native requires updating the `react-native`, `react`, and `expo` package versions in your `package.json` file. Please refer to [this document](https://github.com/react-community/create-react-native-app/blob/master/VERSIONS.md) to find out what versions are supported. You will also need to set the correct `sdkVersion` in your `app.json` file.
+Upgrading your Expo project to a new version of React Native requires updating the `react-native`, `react`, and `expo` package versions in your `package.json` file. Please refer to [this list](https://docs.expo.io/versions/latest/sdk/#sdk-version) to find out what versions are supported. You will also need to set the correct `sdkVersion` in your `app.json` file.
-See the [CRNA user guide](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md#updating-to-new-releases) for up-to-date information about upgrading your project.
+See the [Upgrading Expo SDK Walkthrough](https://docs.expo.io/versions/latest/workflow/upgrading-expo-sdk-walkthrough) for up-to-date information about upgrading your project.
-## Projects built with native code
+## React Native projects
-
-
Projects with Native Code Only
-
- This section only applies to projects made with react-native init or to those made with Create React Native App which have since ejected. For more information about ejecting, please see the guide on the Create React Native App repository.
-
-
-
-Because React Native projects built with native code are essentially made up of an Android project, an iOS project, and a JavaScript project, upgrading can be rather tricky. Here's what you need to do to upgrade from an older version of React Native.
+Because typical React Native projects are essentially made up of an Android project, an iOS project, and a JavaScript project, upgrading can be rather tricky. Here's what you need to do to upgrade from an older version of React Native.
### Upgrade based on Git
-The module `react-native-git-upgrade` provides a one-step operation to upgrade the source files with a minimum of conflicts. Under the hood, it consists in 2 phases:
-
-* First, it computes a Git patch between both old and new template files,
-* Then, the patch is applied on the user's sources.
-
-> **IMPORTANT:** You don't have to install the new version of the `react-native` package, it will be installed automatically.
+The [React Native CLI](https://github.com/react-native-community/react-native-cli) comes with `upgrade` command that provides a one-step operation to upgrade the source files with a minimum of conflicts, thanks to the [rn-diff-purge](https://github.com/react-native-community/rn-diff-purge) project.
-#### 1. Install Git
+#### 1. Make sure your project uses Git
-While your project does not have to be handled by the Git versioning system -- you can use Mercurial, SVN, or nothing -- you will still need to [install Git](https://git-scm.com/downloads) on your system in order to use `react-native-git-upgrade`. Git will also need to be available in the `PATH`.
+> This step applies only to projects that don't use Git. Skip it if yours use it.
-#### 2. Install the `react-native-git-upgrade` module
-
-The `react-native-git-upgrade` module provides a CLI and must be installed globally:
+While your project does not have to be handled by the Git versioning system -- you can use Mercurial, SVN, or nothing -- you will still need to [install Git](https://git-scm.com/downloads) on your system in order to use `react-native upgrade`. Git will also need to be available in the `PATH`. If your project doesn't use Git, initialize it and commit:
```sh
-$ npm install -g react-native-git-upgrade
+git init
+git add .
+git commit -m "upgrade RN"
```
-#### 3. Run the command
+After the upgrade is done and conflicts resolved, you can remove the `.git` directory.
+
+#### 2. Run the `upgrade` command
Run the following command to start the process of upgrading to the latest version:
```sh
-$ react-native-git-upgrade
+react-native upgrade
```
-> You may specify a React Native version by passing an argument: `react-native-git-upgrade X.Y`
+You may specify a React Native version by passing an argument, e.g. to upgrade to `0.59.0-rc.0` run:
-The templates are upgraded in a optimized way. You still may encounter conflicts but only where the Git 3-way merge have failed, depending on the version and how you modified your sources.
+```sh
+react-native upgrade 0.59.0-rc.0
+```
+
+The project is upgraded using `git apply` with 3-way merge. That's why it may happen you'll need to resolve some conflicts.
#### 4. Resolve the conflicts
@@ -106,6 +95,7 @@ npm WARN peerDependencies The peer dependency react@~R included from react-nativ
```
If you saw a warning about the peerDependency, also upgrade `react` by running:
+
```sh
$ npm install --save react@R
# where R is the new version of react from the peerDependency warning you saw
@@ -113,11 +103,9 @@ $ npm install --save react@R
#### 2. Upgrade your project templates
-The new npm package may contain updates to the files that are normally generated when you
-run `react-native init`, like the iOS and the Android sub-projects.
+The new npm package may contain updates to the files that are normally generated when you run `react-native init`, like the iOS and the Android sub-projects.
-You may consult [rn-diff](https://github.com/ncuillery/rn-diff) to see if there were changes in the project template files.
-In case there weren't any, simply rebuild the project and continue developing. In case of minor changes, you may update your project manually and rebuild.
+You may consult [rn-diff-purge](https://github.com/pvinis/rn-diff-purge) to see if there were changes in the project template files. In case there weren't any, simply rebuild the project and continue developing. In case of minor changes, you may update your project manually and rebuild.
If there were major changes, run this in a terminal to get these:
@@ -127,10 +115,10 @@ $ react-native upgrade
This will check your files against the latest template and perform the following:
-* If there is a new file in the template, it is simply created.
-* If a file in the template is identical to your file, it is skipped.
-* If a file is different in your project than the template, you will be prompted; you have options to keep your file or overwrite it with the template version.
+- If there is a new file in the template, it is simply created.
+- If a file in the template is identical to your file, it is skipped.
+- If a file is different in your project than the template, you will be prompted; you have options to keep your file or overwrite it with the template version.
-## Manual Upgrades
+## Manual Upgrades
-Some upgrades require manual steps, e.g. 0.13 to 0.14, or 0.28 to 0.29. Be sure to check the [release notes](https://github.com/facebook/react-native/releases) when upgrading so that you can identify any manual changes your particular project may require.
+Some upgrades require manual steps, e.g. 0.28 to 0.29, or 0.56 to 0.57. Be sure to check the [release notes](https://github.com/facebook/react-native/releases) when upgrading so that you can identify any manual changes your particular project may require.
diff --git a/docs/accessibilityinfo.md b/docs/accessibilityinfo.md
new file mode 100644
index 0000000..2b2fd31
--- /dev/null
+++ b/docs/accessibilityinfo.md
@@ -0,0 +1,119 @@
+---
+id: accessibilityinfo
+title: AccessibilityInfo
+---
+
+Sometimes it's useful to know whether or not the device has a screen reader that is currently active. The `AccessibilityInfo` API is designed for this purpose. You can use it to query the current state of the screen reader as well as to register to be notified when the state of the screen reader changes.
+
+Here's a small example illustrating how to use `AccessibilityInfo`:
+
+```javascript
+class ScreenReaderStatusExample extends React.Component {
+ state = {
+ screenReaderEnabled: false,
+ };
+
+ componentDidMount() {
+ AccessibilityInfo.addEventListener(
+ 'change',
+ this._handleScreenReaderToggled,
+ );
+ AccessibilityInfo.fetch().then((isEnabled) => {
+ this.setState({
+ screenReaderEnabled: isEnabled,
+ });
+ });
+ }
+
+ componentWillUnmount() {
+ AccessibilityInfo.removeEventListener(
+ 'change',
+ this._handleScreenReaderToggled,
+ );
+ }
+
+ _handleScreenReaderToggled = (isEnabled) => {
+ this.setState({
+ screenReaderEnabled: isEnabled,
+ });
+ };
+
+ render() {
+ return (
+
+
+ The screen reader is{' '}
+ {this.state.screenReaderEnabled ? 'enabled' : 'disabled'}.
+
+
+ );
+ }
+}
+```
+
+### Methods
+
+* [`fetch`](accessibilityinfo.md#fetch)
+* [`addEventListener`](accessibilityinfo.md#addeventlistener)
+* [`setAccessibilityFocus`](accessibilityinfo.md#setaccessibilityfocus)
+* [`announceForAccessibility`](accessibilityinfo.md#announceforaccessibility)
+* [`removeEventListener`](accessibilityinfo.md#removeeventlistener)
+
+---
+
+# Reference
+
+## Methods
+
+### `fetch()`
+
+```javascript
+static fetch()
+```
+
+Query whether a screen reader is currently enabled. Returns a promise which resolves to a boolean. The result is `true` when a screen reader is enabled and `false` otherwise.
+
+---
+
+### `addEventListener()`
+
+```javascript
+static addEventListener(eventName, handler)
+```
+
+Add an event handler. Supported events:
+
+* `change`: Fires when the state of the screen reader changes. The argument to the event handler is a boolean. The boolean is `true` when a screen reader is enabled and `false` otherwise.
+* `announcementFinished`: iOS-only event. Fires when the screen reader has finished making an announcement. The argument to the event handler is a dictionary with these keys:
+ * `announcement`: The string announced by the screen reader.
+ * `success`: A boolean indicating whether the announcement was successfully made.
+
+---
+
+### `setAccessibilityFocus()`
+
+```javascript
+static setAccessibilityFocus(reactTag)
+```
+
+Set accessibility focus to a React component. On Android, this is equivalent to `UIManager.sendAccessibilityEvent(reactTag, UIManager.AccessibilityEventTypes.typeViewFocused);`.
+
+---
+
+### `announceForAccessibility()`
+
+```javascript
+static announceForAccessibility(announcement)
+```
+
+iOS-Only. Post a string to be announced by the screen reader.
+
+---
+
+### `removeEventListener()`
+
+```javascript
+static removeEventListener(eventName, handler)
+```
+
+Remove an event handler.
diff --git a/docs/actionsheetios.md b/docs/actionsheetios.md
new file mode 100644
index 0000000..0ebc82e
--- /dev/null
+++ b/docs/actionsheetios.md
@@ -0,0 +1,73 @@
+---
+id: actionsheetios
+title: ActionSheetIOS
+---
+
+### Methods
+
+* [`showActionSheetWithOptions`](actionsheetios.md#showactionsheetwithoptions)
+* [`showShareActionSheetWithOptions`](actionsheetios.md#showshareactionsheetwithoptions)
+
+---
+
+# Reference
+
+## Methods
+
+### `showActionSheetWithOptions()`
+
+```javascript
+static showActionSheetWithOptions(options, callback)
+```
+
+Display an iOS action sheet. The `options` object must contain one or more of:
+
+* `options` (array of strings) - a list of button titles (required)
+* `cancelButtonIndex` (int) - index of cancel button in `options`
+* `destructiveButtonIndex` (int) - index of destructive button in `options`
+* `title` (string) - a title to show above the action sheet
+* `message` (string) - a message to show below the title
+* `tintColor` (string) - the [color](colors.md) used for non-destructive button titles
+
+The 'callback' function takes one parameter, the zero-based index of the selected item.
+
+Minimal example:
+
+```javascript
+ActionSheetIOS.showActionSheetWithOptions(
+ {
+ options: ['Cancel', 'Remove'],
+ destructiveButtonIndex: 1,
+ cancelButtonIndex: 0,
+ },
+ (buttonIndex) => {
+ if (buttonIndex === 1) {
+ /* destructive action */
+ }
+ },
+);
+```
+
+---
+
+### `showShareActionSheetWithOptions()`
+
+```javascript
+static showShareActionSheetWithOptions(options, failureCallback, successCallback)
+```
+
+Display the iOS share sheet. The `options` object should contain one or both of `message` and `url` and can additionally have a `subject` or `excludedActivityTypes`:
+
+* `url` (string) - a URL to share
+* `message` (string) - a message to share
+* `subject` (string) - a subject for the message
+* `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet
+
+NOTE: if `url` points to a local file, or is a base64-encoded uri, the file it points to will be loaded and shared directly. In this way, you can share images, videos, PDF files, etc.
+
+The 'failureCallback' function takes one parameter, an error object. The only property defined on this object is an optional `stack` property of type `string`.
+
+The 'successCallback' function takes two parameters:
+
+* a boolean value signifying success or failure
+* a string that, in the case of success, indicates the method of sharing
diff --git a/docs/activityindicator.md b/docs/activityindicator.md
new file mode 100644
index 0000000..1493278
--- /dev/null
+++ b/docs/activityindicator.md
@@ -0,0 +1,99 @@
+---
+id: activityindicator
+title: ActivityIndicator
+---
+
+Displays a circular loading indicator.
+
+### Example
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react'
+import {
+ ActivityIndicator,
+ AppRegistry,
+ StyleSheet,
+ Text,
+ View,
+} from 'react-native'
+
+export default class App extends Component {
+ render() {
+ return (
+
+
+
+
+
+
+ )
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center'
+ },
+ horizontal: {
+ flexDirection: 'row',
+ justifyContent: 'space-around',
+ padding: 10
+ }
+})
+
+AppRegistry.registerComponent('App', () => App)
+```
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`animating`](activityindicator.md#animating)
+- [`color`](activityindicator.md#color)
+- [`size`](activityindicator.md#size)
+- [`hidesWhenStopped`](activityindicator.md#hideswhenstopped)
+
+---
+
+# Reference
+
+## Props
+
+### `animating`
+
+Whether to show the indicator (true, the default) or hide it (false).
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `color`
+
+The foreground color of the spinner (default is gray).
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `size`
+
+Size of the indicator (default is 'small'). Passing a number to the size prop is only supported on Android.
+
+| Type | Required |
+| ------------------------------- | -------- |
+| enum('small', 'large'), ,number | No |
+
+---
+
+### `hidesWhenStopped`
+
+Whether the indicator should hide when not animating (true by default).
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
diff --git a/docs/alert.md b/docs/alert.md
new file mode 100644
index 0000000..26213f3
--- /dev/null
+++ b/docs/alert.md
@@ -0,0 +1,79 @@
+---
+id: alert
+title: Alert
+---
+
+Launches an alert dialog with the specified title and message.
+
+Optionally provide a list of buttons. Tapping any button will fire the respective onPress callback and dismiss the alert. By default, the only button will be an 'OK' button.
+
+This is an API that works both on iOS and Android and can show static alerts. To show an alert that prompts the user to enter some information, see `AlertIOS`; entering text in an alert is common on iOS only.
+
+## Example
+
+
+
+
iOS
+
Android
+
+
+
+
+
+
+
+
+
+
+
+## iOS
+
+On iOS you can specify any number of buttons. Each button can optionally specify a style, which is one of 'default', 'cancel' or 'destructive'.
+
+## Android
+
+On Android at most three buttons can be specified. Android has a concept of a neutral, negative and a positive button:
+
+* If you specify one button, it will be the 'positive' one (such as 'OK')
+* Two buttons mean 'negative', 'positive' (such as 'Cancel', 'OK')
+* Three buttons mean 'neutral', 'negative', 'positive' (such as 'Later', 'Cancel', 'OK')
+
+By default alerts on Android can be dismissed by tapping outside of the alert box. This event can be handled by providing an optional `options` parameter, with an `onDismiss` callback property `{ onDismiss: () => {} }`.
+
+Alternatively, the dismissing behavior can be disabled altogether by providing an optional `options` parameter with the `cancelable` property set to `false` i.e. `{ cancelable: false }`
+
+Example usage:
+
+```javascript
+// Works on both iOS and Android
+Alert.alert(
+ 'Alert Title',
+ 'My Alert Msg',
+ [
+ {text: 'Ask me later', onPress: () => console.log('Ask me later pressed')},
+ {
+ text: 'Cancel',
+ onPress: () => console.log('Cancel Pressed'),
+ style: 'cancel',
+ },
+ {text: 'OK', onPress: () => console.log('OK Pressed')},
+ ],
+ {cancelable: false},
+);
+```
+
+### Methods
+
+* [`alert`](alert.md#alert)
+
+---
+
+# Reference
+
+## Methods
+
+### `alert()`
+
+```javascript
+static alert(title, message?, buttons?, options?, type?)
+```
diff --git a/docs/alertios.md b/docs/alertios.md
new file mode 100644
index 0000000..0af619c
--- /dev/null
+++ b/docs/alertios.md
@@ -0,0 +1,195 @@
+---
+id: alertios
+title: AlertIOS
+---
+
+`AlertIOS` provides functionality to create an iOS alert dialog with a message or create a prompt for user input.
+
+Creating an iOS alert:
+
+```javascript
+AlertIOS.alert('Sync Complete', 'All your data are belong to us.');
+```
+
+Creating an iOS prompt:
+
+```javascript
+AlertIOS.prompt('Enter a value', null, (text) =>
+ console.log('You entered ' + text),
+);
+```
+
+We recommend using the [`Alert.alert`](alert.md) method for cross-platform support if you don't need to create iOS-only prompts.
+
+### Methods
+
+* [`alert`](alertios.md#alert)
+* [`prompt`](alertios.md#prompt)
+
+### Type Definitions
+
+* [`AlertType`](alertios.md#alerttype)
+* [`AlertButtonStyle`](alertios.md#alertbuttonstyle)
+* [`ButtonsArray`](alertios.md#buttonsarray)
+
+---
+
+# Reference
+
+## Methods
+
+### `alert()`
+
+```javascript
+static alert(title: string, [message]: string, [callbackOrButtons]: ?(() => void), ButtonsArray, [type]: AlertType): [object Object]
+```
+
+Create and display a popup alert.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------------- | ------------------------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| title | string | Yes | The dialog's title. Passing null or '' will hide the title. |
+| message | string | No | An optional message that appears below the dialog's title. |
+| callbackOrButtons | ?(() => void),[ButtonsArray](alertios.md#buttonsarray) | No | This optional argument should be either a single-argument function or an array of buttons. If passed a function, it will be called when the user taps 'OK'. If passed an array of button configurations, each button should include a `text` key, as well as optional `onPress` and `style` keys. `style` should be one of 'default', 'cancel' or 'destructive'. |
+| type | [AlertType](alertios.md#alerttype) | No | Deprecated, do not use. |
+
+Example with custom buttons:
+
+```javascript
+AlertIOS.alert(
+ 'Update available',
+ 'Keep your app up to date to enjoy the latest features',
+ [
+ {
+ text: 'Cancel',
+ onPress: () => console.log('Cancel Pressed'),
+ style: 'cancel',
+ },
+ {
+ text: 'Install',
+ onPress: () => console.log('Install Pressed'),
+ },
+ ],
+);
+```
+
+---
+
+### `prompt()`
+
+```javascript
+static prompt(title: string, [message]: string, [callbackOrButtons]: ?((text: string) => void), ButtonsArray, [type]: AlertType, [defaultValue]: string, [keyboardType]: string): [object Object]
+```
+
+Create and display a prompt to enter some text.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------------- | ------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| title | string | Yes | The dialog's title. |
+| message | string | No | An optional message that appears above the text input. |
+| callbackOrButtons | ?((text: string) => void),[ButtonsArray](alertios.md#buttonsarray) | No | This optional argument should be either a single-argument function or an array of buttons. If passed a function, it will be called with the prompt's value when the user taps 'OK'. If passed an array of button configurations, each button should include a `text` key, as well as optional `onPress` and `style` keys (see example). `style` should be one of 'default', 'cancel' or 'destructive'. |
+| type | [AlertType](alertios.md#alerttype) | No | This configures the text input. One of 'plain-text', 'secure-text' or 'login-password'. |
+| defaultValue | string | No | The default text in text input. |
+| keyboardType | string | No | The keyboard type of first text field(if exists). One of 'default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter' or 'web-search'. |
+
+Example with custom buttons:
+
+```javascript
+AlertIOS.prompt(
+ 'Enter password',
+ 'Enter your password to claim your $1.5B in lottery winnings',
+ [
+ {
+ text: 'Cancel',
+ onPress: () => console.log('Cancel Pressed'),
+ style: 'cancel',
+ },
+ {
+ text: 'OK',
+ onPress: (password) => console.log('OK Pressed, password: ' + password),
+ },
+ ],
+ 'secure-text',
+);
+```
+
+,
+
+Example with the default button and a custom callback:
+
+```javascript
+AlertIOS.prompt(
+ 'Update username',
+ null,
+ (text) => console.log('Your username is ' + text),
+ null,
+ 'default',
+);
+```
+
+## Type Definitions
+
+### AlertType
+
+An Alert button type
+
+| Type |
+| ----- |
+| $Enum |
+
+**Constants:**
+
+| Value | Description |
+| -------------- | ---------------------------- |
+| default | Default alert with no inputs |
+| plain-text | Plain text input alert |
+| secure-text | Secure text input alert |
+| login-password | Login and password alert |
+
+---
+
+### AlertButtonStyle
+
+An Alert button style
+
+| Type |
+| ----- |
+| $Enum |
+
+**Constants:**
+
+| Value | Description |
+| ----------- | ------------------------ |
+| default | Default button style |
+| cancel | Cancel button style |
+| destructive | Destructive button style |
+
+---
+
+### ButtonsArray
+
+Array or buttons
+
+| Type |
+| ----- |
+| Array |
+
+**Properties:**
+
+| Name | Type | Description |
+| --------- | ------------------------------------------------ | ------------------------------------- |
+| [text] | string | Button label |
+| [onPress] | function | Callback function when button pressed |
+| [style] | [AlertButtonStyle](alertios.md#alertbuttonstyle) | Button style |
+
+**Constants:**
+
+| Value | Description |
+| ------- | ------------------------------------- |
+| text | Button label |
+| onPress | Callback function when button pressed |
+| style | Button style |
diff --git a/docs/animated.md b/docs/animated.md
new file mode 100644
index 0000000..9b3c367
--- /dev/null
+++ b/docs/animated.md
@@ -0,0 +1,418 @@
+---
+id: animated
+title: Animated
+---
+
+The `Animated` library is designed to make animations fluid, powerful, and easy to build and maintain. `Animated` focuses on declarative relationships between inputs and outputs, with configurable transforms in between, and simple `start`/`stop` methods to control time-based animation execution.
+
+The simplest workflow for creating an animation is to create an `Animated.Value`, hook it up to one or more style attributes of an animated component, and then drive updates via animations using `Animated.timing()`:
+
+```javascript
+Animated.timing(
+ // Animate value over time
+ this.state.fadeAnim, // The value to drive
+ {
+ toValue: 1, // Animate to final value of 1
+ },
+).start(); // Start the animation
+```
+
+Refer to the [Animations](animations.md#animated-api) guide to see additional examples of `Animated` in action.
+
+## Overview
+
+There are two value types you can use with `Animated`:
+
+* [`Animated.Value()`](animated.md#value) for single values
+* [`Animated.ValueXY()`](animated.md#valuexy) for vectors
+
+`Animated.Value` can bind to style properties or other props, and can be interpolated as well. A single `Animated.Value` can drive any number of properties.
+
+### Configuring animations
+
+`Animated` provides three types of animation types. Each animation type provides a particular animation curve that controls how your values animate from their initial value to the final value:
+
+* [`Animated.decay()`](animated.md#decay) starts with an initial velocity and gradually slows to a stop.
+* [`Animated.spring()`](animated.md#spring) provides a simple spring physics model.
+* [`Animated.timing()`](animated.md#timing) animates a value over time using [easing functions](easing.md).
+
+In most cases, you will be using `timing()`. By default, it uses a symmetric easeInOut curve that conveys the gradual acceleration of an object to full speed and concludes by gradually decelerating to a stop.
+
+### Working with animations
+
+Animations are started by calling `start()` on your animation. `start()` takes a completion callback that will be called when the animation is done. If the animation finished running normally, the completion callback will be invoked with `{finished: true}`. If the animation is done because `stop()` was called on it before it could finish (e.g. because it was interrupted by a gesture or another animation), then it will receive `{finished: false}`.
+
+### Using the native driver
+
+By using the native driver, we send everything about the animation to native before starting the animation, allowing native code to perform the animation on the UI thread without having to go through the bridge on every frame. Once the animation has started, the JS thread can be blocked without affecting the animation.
+
+You can use the native driver by specifying `useNativeDriver: true` in your animation configuration. See the [Animations](animations.md#using-the-native-driver) guide to learn more.
+
+### Animatable components
+
+Only animatable components can be animated. These special components do the magic of binding the animated values to the properties, and do targeted native updates to avoid the cost of the react render and reconciliation process on every frame. They also handle cleanup on unmount so they are safe by default.
+
+* [`createAnimatedComponent()`](animated.md#createanimatedcomponent) can be used to make a component animatable.
+
+`Animated` exports the following animatable components using the above wrapper:
+
+* `Animated.Image`
+* `Animated.ScrollView`
+* `Animated.Text`
+* `Animated.View`
+
+### Composing animations
+
+Animations can also be combined in complex ways using composition functions:
+
+* [`Animated.delay()`](animated.md#delay) starts an animation after a given delay.
+* [`Animated.parallel()`](animated.md#parallel) starts a number of animations at the same time.
+* [`Animated.sequence()`](animated.md#sequence) starts the animations in order, waiting for each to complete before starting the next.
+* [`Animated.stagger()`](animated.md#stagger) starts animations in order and in parallel, but with successive delays.
+
+Animations can also be chained together simply by setting the `toValue` of one animation to be another `Animated.Value`. See [Tracking dynamic values](animations.md#tracking-dynamic-values) in the Animations guide.
+
+By default, if one animation is stopped or interrupted, then all other animations in the group are also stopped.
+
+### Combining animated values
+
+You can combine two animated values via addition, subtraction, multiplication, division, or modulo to make a new animated value:
+
+* [`Animated.add()`](animated.md#add)
+* [`Animated.subtract()`](animated.md#subtract)
+* [`Animated.divide()`](animated.md#divide)
+* [`Animated.modulo()`](animated.md#modulo)
+* [`Animated.multiply()`](animated.md#multiply)
+
+### Interpolation
+
+The `interpolate()` function allows input ranges to map to different output ranges. By default, it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value. It uses lineal interpolation by default but also supports easing functions.
+
+* [`interpolate()`](animated.md#interpolate)
+
+Read more about interpolation in the [Animation](animations.md#interpolation) guide.
+
+### Handling gestures and other events
+
+Gestures, like panning or scrolling, and other events can map directly to animated values using `Animated.event()`. This is done with a structured map syntax so that values can be extracted from complex event objects. The first level is an array to allow mapping across multiple args, and that array contains nested objects.
+
+* [`Animated.event()`](animated.md#event)
+
+For example, when working with horizontal scrolling gestures, you would do the following in order to map `event.nativeEvent.contentOffset.x` to `scrollX` (an `Animated.Value`):
+
+```javascript
+ onScroll={Animated.event(
+ // scrollX = e.nativeEvent.contentOffset.x
+ [{ nativeEvent: {
+ contentOffset: {
+ x: scrollX
+ }
+ }
+ }]
+ )}
+```
+
+### Methods
+
+* [`decay`](animated.md#decay)
+* [`timing`](animated.md#timing)
+* [`spring`](animated.md#spring)
+* [`add`](animated.md#add)
+* [`subtract`](animated.md#subtract)
+* [`divide`](animated.md#divide)
+* [`multiply`](animated.md#multiply)
+* [`modulo`](animated.md#modulo)
+* [`diffClamp`](animated.md#diffclamp)
+* [`delay`](animated.md#delay)
+* [`sequence`](animated.md#sequence)
+* [`parallel`](animated.md#parallel)
+* [`stagger`](animated.md#stagger)
+* [`loop`](animated.md#loop)
+* [`event`](animated.md#event)
+* [`forkEvent`](animated.md#forkevent)
+* [`unforkEvent`](animated.md#unforkevent)
+
+### Properties
+
+* [`Value`](animated.md#value)
+* [`ValueXY`](animated.md#valuexy)
+* [`Interpolation`](animated.md#interpolation)
+* [`Node`](animated.md#node)
+* [`createAnimatedComponent`](animated.md#createanimatedcomponent)
+* [`attachNativeEvent`](animated.md#attachnativeevent)
+
+---
+
+# Reference
+
+## Methods
+
+When the given value is a ValueXY instead of a Value, each config option may be a vector of the form `{x: ..., y: ...}` instead of a scalar.
+
+### `decay()`
+
+```javascript
+static decay(value, config)
+```
+
+Animates a value from an initial velocity to zero based on a decay coefficient.
+
+Config is an object that may have the following options:
+
+* `velocity`: Initial velocity. Required.
+* `deceleration`: Rate of decay. Default 0.997.
+* `isInteraction`: Whether or not this animation creates an "interaction handle" on the `InteractionManager`. Default true.
+* `useNativeDriver`: Uses the native driver when true. Default false.
+
+---
+
+### `timing()`
+
+```javascript
+static timing(value, config)
+```
+
+Animates a value along a timed easing curve. The [`Easing`](easing.md) module has tons of predefined curves, or you can use your own function.
+
+Config is an object that may have the following options:
+
+* `duration`: Length of animation (milliseconds). Default 500.
+* `easing`: Easing function to define curve. Default is `Easing.inOut(Easing.ease)`.
+* `delay`: Start the animation after delay (milliseconds). Default 0.
+* `isInteraction`: Whether or not this animation creates an "interaction handle" on the `InteractionManager`. Default true.
+* `useNativeDriver`: Uses the native driver when true. Default false.
+
+---
+
+### `spring()`
+
+```javascript
+static spring(value, config)
+```
+
+Animates a value according to an analytical spring model based on [damped harmonic oscillation](https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator). Tracks velocity state to create fluid motions as the `toValue` updates, and can be chained together.
+
+Config is an object that may have the following options.
+
+Note that you can only define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one:
+
+The friction/tension or bounciness/speed options match the spring model in [Facebook Pop](https://github.com/facebook/pop), [Rebound](http://facebook.github.io/rebound/), and [Origami](http://origami.design/).
+
+* `friction`: Controls "bounciness"/overshoot. Default 7.
+* `tension`: Controls speed. Default 40.
+* `speed`: Controls speed of the animation. Default 12.
+* `bounciness`: Controls bounciness. Default 8.
+
+Specifying stiffness/damping/mass as parameters makes `Animated.spring` use an analytical spring model based on the motion equations of a [damped harmonic oscillator](https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator). This behavior is slightly more precise and faithful to the physics behind spring dynamics, and closely mimics the implementation in iOS's CASpringAnimation primitive.
+
+* `stiffness`: The spring stiffness coefficient. Default 100.
+* `damping`: Defines how the spring’s motion should be damped due to the forces of friction. Default 10.
+* `mass`: The mass of the object attached to the end of the spring. Default 1.
+
+Other configuration options are as follows:
+
+* `velocity`: The initial velocity of the object attached to the spring. Default 0 (object is at rest).
+* `overshootClamping`: Boolean indicating whether the spring should be clamped and not bounce. Default false.
+* `restDisplacementThreshold`: The threshold of displacement from rest below which the spring should be considered at rest. Default 0.001.
+* `restSpeedThreshold`: The speed at which the spring should be considered at rest in pixels per second. Default 0.001.
+* `delay`: Start the animation after delay (milliseconds). Default 0.
+* `isInteraction`: Whether or not this animation creates an "interaction handle" on the `InteractionManager`. Default true.
+* `useNativeDriver`: Uses the native driver when true. Default false.
+
+---
+
+### `add()`
+
+```javascript
+static add(a, b)
+```
+
+Creates a new Animated value composed from two Animated values added together.
+
+---
+
+### `subtract()`
+
+```javascript
+static subtract(a, b)
+```
+
+Creates a new Animated value composed by subtracting the second Animated value from the first Animated value.
+
+---
+
+### `divide()`
+
+```javascript
+static divide(a, b)
+```
+
+Creates a new Animated value composed by dividing the first Animated value by the second Animated value.
+
+---
+
+### `multiply()`
+
+```javascript
+static multiply(a, b)
+```
+
+Creates a new Animated value composed from two Animated values multiplied together.
+
+---
+
+### `modulo()`
+
+```javascript
+static modulo(a, modulus)
+```
+
+Creates a new Animated value that is the (non-negative) modulo of the provided Animated value
+
+---
+
+### `diffClamp()`
+
+```javascript
+static diffClamp(a, min, max)
+```
+
+Create a new Animated value that is limited between 2 values. It uses the difference between the last value so even if the value is far from the bounds it will start changing when the value starts getting closer again. (`value = clamp(value + diff, min, max)`).
+
+This is useful with scroll events, for example, to show the navbar when scrolling up and to hide it when scrolling down.
+
+---
+
+### `delay()`
+
+```javascript
+static delay(time)
+```
+
+Starts an animation after the given delay.
+
+---
+
+### `sequence()`
+
+```javascript
+static sequence(animations)
+```
+
+Starts an array of animations in order, waiting for each to complete before starting the next. If the current running animation is stopped, no following animations will be started.
+
+---
+
+### `parallel()`
+
+```javascript
+static parallel(animations, config?)
+```
+
+Starts an array of animations all at the same time. By default, if one of the animations is stopped, they will all be stopped. You can override this with the `stopTogether` flag.
+
+---
+
+### `stagger()`
+
+```javascript
+static stagger(time, animations)
+```
+
+Array of animations may run in parallel (overlap), but are started in sequence with successive delays. Nice for doing trailing effects.
+
+---
+
+### `loop()`
+
+```javascript
+static loop(animation, config?)
+```
+
+Loops a given animation continuously, so that each time it reaches the end, it resets and begins again from the start. Will loop without blocking the UI thread if the child animation is set to `useNativeDriver: true`. In addition, loops can prevent `VirtualizedList`-based components from rendering more rows while the animation is running. You can pass `isInteraction: false` in the child animation config to fix this.
+
+Config is an object that may have the following options:
+
+* `iterations`: Number of times the animation should loop. Default `-1` (infinite).
+
+---
+
+### `event()`
+
+```javascript
+static event(argMapping, config?)
+```
+
+Takes an array of mappings and extracts values from each arg accordingly, then calls `setValue` on the mapped outputs. e.g.
+
+```javascript
+ onScroll={Animated.event(
+ [{nativeEvent: {contentOffset: {x: this._scrollX}}}],
+ {listener: (event) => console.log(event)}, // Optional async listener
+ )}
+ ...
+ onPanResponderMove: Animated.event([
+ null, // raw event arg ignored
+ {dx: this._panX}], // gestureState arg
+{listener: (event, gestureState) => console.log(event, gestureState)}, // Optional async listener
+ ),
+```
+
+Config is an object that may have the following options:
+
+* `listener`: Optional async listener.
+* `useNativeDriver`: Uses the native driver when true. Default false.
+
+---
+
+### `forkEvent()`
+
+```javascript
+static forkEvent(event, listener)
+```
+
+Advanced imperative API for snooping on animated events that are passed in through props. It permits to add a new javascript listener to an existing `AnimatedEvent`. If `animatedEvent` is a simple javascript listener, it will merge the 2 listeners into a single one, and if `animatedEvent` is null/undefined, it will assign the javascript listener directly. Use values directly where possible.
+
+---
+
+### `unforkEvent()`
+
+```javascript
+static unforkEvent(event, listener)
+```
+
+## Properties
+
+### `Value`
+
+Standard value class for driving animations. Typically initialized with `new Animated.Value(0);`
+
+---
+
+### `ValueXY`
+
+2D value class for driving 2D animations, such as pan gestures.
+
+---
+
+### `Interpolation`
+
+Exported to use the Interpolation type in flow.
+
+---
+
+### `Node`
+
+Exported for ease of type checking. All animated values derive from this class.
+
+---
+
+### `createAnimatedComponent`
+
+Make any React component Animatable. Used to create `Animated.View`, etc.
+
+---
+
+### `attachNativeEvent`
+
+Imperative API to attach an animated value to an event on a view. Prefer using `Animated.event` with `useNativeDrive: true` if possible.
diff --git a/docs/animatedvalue.md b/docs/animatedvalue.md
new file mode 100644
index 0000000..2f2bb6c
--- /dev/null
+++ b/docs/animatedvalue.md
@@ -0,0 +1,228 @@
+---
+id: animatedvalue
+title: AnimatedValue
+---
+
+Standard value for driving animations. One `Animated.Value` can drive multiple properties in a synchronized fashion, but can only be driven by one mechanism at a time. Using a new mechanism (e.g. starting a new animation, or calling `setValue`) will stop any previous ones.
+
+Typically initialized with `new Animated.Value(0);`
+
+See also [`Animated`](animated.md).
+
+### Methods
+
+* [`setValue`](animatedvalue.md#setvalue)
+* [`setOffset`](animatedvalue.md#setoffset)
+* [`flattenOffset`](animatedvalue.md#flattenoffset)
+* [`extractOffset`](animatedvalue.md#extractoffset)
+* [`addListener`](animatedvalue.md#addlistener)
+* [`removeListener`](animatedvalue.md#removelistener)
+* [`removeAllListeners`](animatedvalue.md#removealllisteners)
+* [`stopAnimation`](animatedvalue.md#stopanimation)
+* [`resetAnimation`](animatedvalue.md#resetanimation)
+* [`interpolate`](animatedvalue.md#interpolate)
+* [`animate`](animatedvalue.md#animate)
+* [`stopTracking`](animatedvalue.md#stoptracking)
+* [`track`](animatedvalue.md#track)
+
+---
+
+# Reference
+
+## Methods
+
+### `setValue()`
+
+```javascript
+setValue(value);
+```
+
+Directly set the value. This will stop any animations running on the value and update all the bound properties.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----- | ------ | -------- | ----------- |
+| value | number | Yes | Value |
+
+---
+
+### `setOffset()`
+
+```javascript
+setOffset(offset);
+```
+
+Sets an offset that is applied on top of whatever value is set, whether via `setValue`, an animation, or `Animated.event`. Useful for compensating things like the start of a pan gesture.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ------------ |
+| offset | number | Yes | Offset value |
+
+---
+
+### `flattenOffset()`
+
+```javascript
+flattenOffset();
+```
+
+Merges the offset value into the base value and resets the offset to zero. The final output of the value is unchanged.
+
+---
+
+### `extractOffset()`
+
+```javascript
+extractOffset();
+```
+
+Sets the offset value to the base value, and resets the base value to zero. The final output of the value is unchanged.
+
+---
+
+### `addListener()`
+
+```javascript
+addListener(callback);
+```
+
+Adds an asynchronous listener to the value so you can observe updates from animations. This is useful because there is no way to synchronously read the value because it might be driven natively.
+
+Returns a string that serves as an identifier for the listener.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ------------------------------------------------------------------------------------------- |
+| callback | function | Yes | The callback function which will receive an object with a `value` key set to the new value. |
+
+---
+
+### `removeListener()`
+
+```javascript
+removeListener(id);
+```
+
+Unregister a listener. The `id` param shall match the identifier previously returned by `addListener()`.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ------ | -------- | ---------------------------------- |
+| id | string | Yes | Id for the listener being removed. |
+
+---
+
+### `removeAllListeners()`
+
+```javascript
+removeAllListeners();
+```
+
+Remove all registered listeners.
+
+---
+
+### `stopAnimation()`
+
+```javascript
+stopAnimation([callback]);
+```
+
+Stops any running animation or tracking. `callback` is invoked with the final value after stopping the animation, which is useful for updating state to match the animation position with layout.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | --------------------------------------------- |
+| callback | function | No | A function that will receive the final value. |
+
+---
+
+### `resetAnimation()`
+
+```javascript
+resetAnimation([callback]);
+```
+
+Stops any animation and resets the value to its original.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ------------------------------------------------ |
+| callback | function | No | A function that will receive the original value. |
+
+---
+
+### `interpolate()`
+
+```javascript
+interpolate(config);
+```
+
+Interpolates the value before updating the property, e.g. mapping 0-1 to 0-10.
+
+See `AnimatedInterpolation.js`
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ----------- |
+| config | object | Yes | See below. |
+
+The `config` object is composed of the following keys:
+
+* `inputRange`: an array of numbers
+* `outputRange`: an array of numbers or strings
+* `easing` (optional): a function that returns a number, given an input number
+* `extrapolate` (optional): a string such as 'extend', 'identity', or 'clamp'
+* `extrapolateLeft` (optional): a string such as 'extend', 'identity', or 'clamp'
+* `extrapolateRight` (optional): a string such as 'extend', 'identity', or 'clamp'
+
+---
+
+### `animate()`
+
+```javascript
+animate(animation, callback);
+```
+
+Typically only used internally, but could be used by a custom Animation class.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| --------- | --------- | -------- | ------------------- |
+| animation | Animation | Yes | See `Animation.js`. |
+| callback | function | Yes | Callback function. |
+
+---
+
+### `stopTracking()`
+
+```javascript
+stopTracking();
+```
+
+Typically only used internally.
+
+---
+
+### `track()`
+
+```javascript
+track(tracking);
+```
+
+Typically only used internally.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ------------ | -------- | --------------------- |
+| tracking | AnimatedNode | Yes | See `AnimatedNode.js` |
diff --git a/docs/animatedvaluexy.md b/docs/animatedvaluexy.md
new file mode 100644
index 0000000..3238080
--- /dev/null
+++ b/docs/animatedvaluexy.md
@@ -0,0 +1,222 @@
+---
+id: animatedvaluexy
+title: AnimatedValueXY
+---
+
+2D Value for driving 2D animations, such as pan gestures. Almost identical API to normal [`Animated.Value`](animatedvalue.md), but multiplexed. Contains two regular `Animated.Value`s under the hood.
+
+See also [`Animated`](animated.md).
+
+## Example
+
+```javascript
+class DraggableView extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ pan: new Animated.ValueXY(), // inits to zero
+ };
+ this.state.panResponder = PanResponder.create({
+ onStartShouldSetPanResponder: () => true,
+ onPanResponderMove: Animated.event([
+ null,
+ {
+ dx: this.state.pan.x, // x,y are Animated.Value
+ dy: this.state.pan.y,
+ },
+ ]),
+ onPanResponderRelease: () => {
+ Animated.spring(
+ this.state.pan, // Auto-multiplexed
+ {toValue: {x: 0, y: 0}}, // Back to zero
+ ).start();
+ },
+ });
+ }
+ render() {
+ return (
+
+ {this.props.children}
+
+ );
+ }
+}
+```
+
+### Methods
+
+* [`setValue`](animatedvaluexy.md#setvalue)
+* [`setOffset`](animatedvaluexy.md#setoffset)
+* [`flattenOffset`](animatedvaluexy.md#flattenoffset)
+* [`extractOffset`](animatedvaluexy.md#extractoffset)
+* [`addListener`](animatedvaluexy.md#addlistener)
+* [`removeListener`](animatedvaluexy.md#removelistener)
+* [`removeAllListeners`](animatedvaluexy.md#removealllisteners)
+* [`stopAnimation`](animatedvaluexy.md#stopanimation)
+* [`resetAnimation`](animatedvaluexy.md#resetanimation)
+* [`getLayout`](animatedvaluexy.md#getlayout)
+* [`getTranslateTransform`](animatedvaluexy.md#gettranslatetransform)
+
+---
+
+# Reference
+
+## Methods
+
+### `setValue()`
+
+```javascript
+setValue(value);
+```
+
+Directly set the value. This will stop any animations running on the value and update all the bound properties.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----- | ------ | -------- | ----------- |
+| value | number | Yes | |
+
+---
+
+### `setOffset()`
+
+```javascript
+setOffset(offset);
+```
+
+Sets an offset that is applied on top of whatever value is set, whether via `setValue`, an animation, or `Animated.event`. Useful for compensating things like the start of a pan gesture.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ----------- |
+| offset | number | Yes | |
+
+---
+
+### `flattenOffset()`
+
+```javascript
+flattenOffset();
+```
+
+Merges the offset value into the base value and resets the offset to zero. The final output of the value is unchanged.
+
+---
+
+### `extractOffset()`
+
+```javascript
+extractOffset();
+```
+
+Sets the offset value to the base value, and resets the base value to zero. The final output of the value is unchanged.
+
+---
+
+### `addListener()`
+
+```javascript
+addListener(callback);
+```
+
+Adds an asynchronous listener to the value so you can observe updates from animations. This is useful because there is no way to synchronously read the value because it might be driven natively.
+
+Returns a string that serves as an identifier for the listener.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ------------------------------------------------------------------------------------------- |
+| callback | function | Yes | The callback function which will receive an object with a `value` key set to the new value. |
+
+---
+
+### `removeListener()`
+
+```javascript
+removeListener(id);
+```
+
+Unregister a listener. The `id` param shall match the identifier previously returned by `addListener()`.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ------ | -------- | ---------------------------------- |
+| id | string | Yes | Id for the listener being removed. |
+
+---
+
+### `removeAllListeners()`
+
+```javascript
+removeAllListeners();
+```
+
+Remove all registered listeners.
+
+---
+
+### `stopAnimation()`
+
+```javascript
+stopAnimation([callback]);
+```
+
+Stops any running animation or tracking. `callback` is invoked with the final value after stopping the animation, which is useful for updating state to match the animation position with layout.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | --------------------------------------------- |
+| callback | function | No | A function that will receive the final value. |
+
+---
+
+### `resetAnimation()`
+
+```javascript
+resetAnimation([callback]);
+```
+
+Stops any animation and resets the value to its original.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ------------------------------------------------ |
+| callback | function | No | A function that will receive the original value. |
+
+---
+
+### `getLayout()`
+
+```javascript
+getLayout();
+```
+
+Converts `{x, y}` into `{left, top}` for use in style, e.g.
+
+```javascript
+style={this.state.anim.getLayout()}
+```
+
+---
+
+### `getTranslateTransform()`
+
+```javascript
+getTranslateTransform();
+```
+
+Converts `{x, y}` into a useable translation transform, e.g.
+
+```javascript
+style={{
+ transform: this.state.anim.getTranslateTransform()
+}}
+```
diff --git a/docs/app-extensions.md b/docs/app-extensions.md
new file mode 100644
index 0000000..3e36545
--- /dev/null
+++ b/docs/app-extensions.md
@@ -0,0 +1,26 @@
+---
+id: app-extensions
+title: App Extensions
+---
+
+App extensions let you provide custom functionality and content outside of your main app. There are different types of app extensions on iOS, and they are all covered in the [App Extension Programming Guide](https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/index.html#//apple_ref/doc/uid/TP40014214-CH20-SW1). In this guide, we'll briefly cover how you may take advantage of app extensions on iOS.
+
+## Memory use in extensions
+
+As these extensions are loaded outside of the regular app sandbox, it's highly likely that several of these app extensions will be loaded simultaneously. As you might expect, these extensions have small memory usage limits. Keep these in mind when developing your app extensions. It's always highly recommended to test your application on an actual device, and more so when developing app extensions: too frequently, developers find that their extension works just fine in the iOS Simulator, only to get user reports that their extension is not loading on actual devices.
+
+We highly recommend that you watch Conrad Kramer's talk on [Memory Use in Extensions](https://cocoaheads.tv/memory-use-in-extensions-by-conrad-kramer/) to learn more about this topic.
+
+### Today widget
+
+The memory limit of a Today widget is 16 MB. As it happens, Today widget implementations using React Native may work unreliably because the memory usage tends to be too high. You can tell if your Today widget is exceeding the memory limit if it yields the message 'Unable to Load':
+
+
+
+Always make sure to test your app extensions in a real device, but be aware that this may not be sufficient, especially when dealing with Today widgets. Debug-configured builds are more likely to exceed the memory limits, while release-configured builds don't fail right away. We highly recommend that you use [Xcode's Instruments](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/index.html) to analyze your real world memory usage, as it's very likely that your release-configured build is very close to the 16 MB limit. In situations like these, it is easy to go over the 16 MB limit by performing common operations, such as fetching data from an API.
+
+To experiment with the limits of React Native Today widget implementations, try extending the example project in [react-native-today-widget](https://github.com/matejkriz/react-native-today-widget/).
+
+### Other app extensions
+
+Other types of app extensions have greater memory limits than the Today widget. For instance, Custom Keyboard extensions are limited to 48 MB, and Share extensions are limited to 120 MB. Implementing such app extensions with React Native is more viable. One proof of concept example is [react-native-ios-share-extension](https://github.com/andrewsardone/react-native-ios-share-extension).
diff --git a/docs/appregistry.md b/docs/appregistry.md
new file mode 100644
index 0000000..1bf95b2
--- /dev/null
+++ b/docs/appregistry.md
@@ -0,0 +1,192 @@
+---
+id: appregistry
+title: AppRegistry
+---
+
+
+
Project with Native Code Required
+
+ This API only works in projects made with react-native init
+ or in those made with expo init or Create React Native App which have since ejected. For
+ more information about ejecting, please see
+ the guide on
+ the Create React Native App repository.
+
+
+
+`AppRegistry` is the JS entry point to running all React Native apps. App root components should register themselves with `AppRegistry.registerComponent`, then the native system can load the bundle for the app and then actually run the app when it's ready by invoking `AppRegistry.runApplication`.
+
+To "stop" an application when a view should be destroyed, call `AppRegistry.unmountApplicationComponentAtRootTag` with the tag that was passed into `runApplication`. These should always be used as a pair.
+
+`AppRegistry` should be required early in the `require` sequence to make sure the JS execution environment is setup before other modules are required.
+
+### Methods
+
+* [`setWrapperComponentProvider`](appregistry.md#setwrappercomponentprovider)
+* [`registerConfig`](appregistry.md#registerconfig)
+* [`registerComponent`](appregistry.md#registercomponent)
+* [`registerRunnable`](appregistry.md#registerrunnable)
+* [`registerSection`](appregistry.md#registersection)
+* [`getAppKeys`](appregistry.md#getappkeys)
+* [`getSectionKeys`](appregistry.md#getsectionkeys)
+* [`getSections`](appregistry.md#getsections)
+* [`getRunnable`](appregistry.md#getrunnable)
+* [`getRegistry`](appregistry.md#getregistry)
+* [`setComponentProviderInstrumentationHook`](appregistry.md#setcomponentproviderinstrumentationhook)
+* [`runApplication`](appregistry.md#runapplication)
+* [`unmountApplicationComponentAtRootTag`](appregistry.md#unmountapplicationcomponentatroottag)
+* [`registerHeadlessTask`](appregistry.md#registerheadlesstask)
+* [`registerCancellableHeadlessTask`](appregistry.md#registercancellableheadlesstask)
+* [`startHeadlessTask`](appregistry.md#startheadlesstask)
+* [`cancelHeadlessTask`](appregistry.md#cancelheadlesstask)
+
+---
+
+# Reference
+
+## Methods
+
+### `setWrapperComponentProvider()`
+
+```javascript
+static setWrapperComponentProvider(provider)
+```
+
+---
+
+### `registerConfig()`
+
+```javascript
+static registerConfig(config)
+```
+
+---
+
+### `registerComponent()`
+
+```javascript
+static registerComponent(appKey, componentProvider, section?)
+```
+
+---
+
+### `registerRunnable()`
+
+```javascript
+static registerRunnable(appKey, run)
+```
+
+---
+
+### `registerSection()`
+
+```javascript
+static registerSection(appKey, component)
+```
+
+---
+
+### `getAppKeys()`
+
+```javascript
+static getAppKeys()
+```
+
+---
+
+### `getSectionKeys()`
+
+```javascript
+static getSectionKeys()
+```
+
+---
+
+### `getSections()`
+
+```javascript
+static getSections()
+```
+
+---
+
+### `getRunnable()`
+
+```javascript
+static getRunnable(appKey)
+```
+
+---
+
+### `getRegistry()`
+
+```javascript
+static getRegistry()
+```
+
+---
+
+### `setComponentProviderInstrumentationHook()`
+
+```javascript
+static setComponentProviderInstrumentationHook(hook)
+```
+
+---
+
+### `runApplication()`
+
+```javascript
+static runApplication(appKey, appParameters)
+```
+
+---
+
+### `unmountApplicationComponentAtRootTag()`
+
+```javascript
+static unmountApplicationComponentAtRootTag(rootTag)
+```
+
+---
+
+### `registerHeadlessTask()`
+
+```javascript
+static registerHeadlessTask(taskKey, taskProvider)
+```
+
+Register a headless task. A headless task is a bit of code that runs without a UI. @param taskKey the key associated with this task @param taskProvider a promise returning function that takes some data passed from the native side as the only argument; when the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context.
+
+---
+
+### `registerCancellableHeadlessTask()`
+
+```javascript
+static registerCancellableHeadlessTask(taskKey, taskProvider, taskCancelProvider)
+```
+
+Register a headless task which can be cancelled. A headless task is a bit of code that runs without a UI. @param taskKey the key associated with this task @param taskProvider a promise returning function that takes some data passed from the native side as the only argument; when the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context. @param taskCancelProvider a void returning function that takes no arguments; when a cancellation is requested, the function being executed by taskProvider should wrap up and return ASAP.
+---
+
+### `startHeadlessTask()`
+
+```javascript
+static startHeadlessTask(taskId, taskKey, data)
+```
+
+Only called from native code. Starts a headless task.
+
+@param taskId the native id for this task instance to keep track of its execution @param taskKey the key for the task to start @param data the data to pass to the task
+
+---
+
+### `cancelHeadlessTask()`
+
+```javascript
+static cancelHeadlessTask(taskId, taskKey)
+```
+
+Only called from native code. Cancels a headless task.
+
+@param taskId the native id for this task instance that was used when startHeadlessTask was called @param taskKey the key for the task that was used when startHeadlessTask was called
diff --git a/docs/appstate.md b/docs/appstate.md
new file mode 100644
index 0000000..9d3999c
--- /dev/null
+++ b/docs/appstate.md
@@ -0,0 +1,101 @@
+---
+id: appstate
+title: AppState
+---
+
+`AppState` can tell you if the app is in the foreground or background, and notify you when the state changes.
+
+AppState is frequently used to determine the intent and proper behavior when handling push notifications.
+
+### App States
+
+* `active` - The app is running in the foreground
+* `background` - The app is running in the background. The user is either:
+ * in another app
+ * on the home screen
+ * [Android] on another `Activity` (even if it was launched by your app)
+* `inactive` - This is a state that occurs when transitioning between foreground & background, and during periods of inactivity such as entering the Multitasking view or in the event of an incoming call
+
+For more information, see [Apple's documentation](https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheAppLifeCycle/TheAppLifeCycle.html)
+
+### Basic Usage
+
+To see the current state, you can check `AppState.currentState`, which will be kept up-to-date. However, `currentState` will be null at launch while `AppState` retrieves it over the bridge.
+
+```javascript
+import React, {Component} from 'react';
+import {AppState, Text} from 'react-native';
+
+class AppStateExample extends Component {
+ state = {
+ appState: AppState.currentState,
+ };
+
+ componentDidMount() {
+ AppState.addEventListener('change', this._handleAppStateChange);
+ }
+
+ componentWillUnmount() {
+ AppState.removeEventListener('change', this._handleAppStateChange);
+ }
+
+ _handleAppStateChange = (nextAppState) => {
+ if (
+ this.state.appState.match(/inactive|background/) &&
+ nextAppState === 'active'
+ ) {
+ console.log('App has come to the foreground!');
+ }
+ this.setState({appState: nextAppState});
+ };
+
+ render() {
+ return Current state is: {this.state.appState};
+ }
+}
+```
+
+This example will only ever appear to say "Current state is: active" because the app is only visible to the user when in the `active` state, and the null state will happen only momentarily.
+
+### Methods
+
+* [`addEventListener`](appstate.md#addeventlistener)
+* [`removeEventListener`](appstate.md#removeeventlistener)
+
+### Properties
+
+* [`currentState`](appstate.md#currentState)
+
+---
+
+# Reference
+
+## Methods
+
+### `addEventListener()`
+
+```javascript
+addEventListener(type, handler);
+```
+
+Add a handler to AppState changes by listening to the `change` event type and providing the handler
+
+TODO: now that AppState is a subclass of NativeEventEmitter, we could deprecate `addEventListener` and `removeEventListener` and just use `addListener` and `listener.remove()` directly. That will be a breaking change though, as both the method and event names are different (addListener events are currently required to be globally unique).
+
+---
+
+### `removeEventListener()`
+
+```javascript
+removeEventListener(type, handler);
+```
+
+Remove a handler by passing the `change` event type and the handler
+
+## Properties
+
+### `currentState`
+
+```javascript
+AppState.currentState;
+```
diff --git a/docs/assets/AddToBuildPhases.png b/docs/assets/AddToBuildPhases.png
new file mode 100644
index 0000000..cf951e5
Binary files /dev/null and b/docs/assets/AddToBuildPhases.png differ
diff --git a/docs/assets/AddToLibraries.png b/docs/assets/AddToLibraries.png
new file mode 100644
index 0000000..8241b46
Binary files /dev/null and b/docs/assets/AddToLibraries.png differ
diff --git a/docs/assets/AddToSearchPaths.png b/docs/assets/AddToSearchPaths.png
new file mode 100644
index 0000000..a8cdccf
Binary files /dev/null and b/docs/assets/AddToSearchPaths.png differ
diff --git a/docs/assets/Alert/exampleandroid.gif b/docs/assets/Alert/exampleandroid.gif
new file mode 100644
index 0000000..abf3c62
Binary files /dev/null and b/docs/assets/Alert/exampleandroid.gif differ
diff --git a/docs/assets/Alert/exampleios.gif b/docs/assets/Alert/exampleios.gif
new file mode 100644
index 0000000..b6ad9a5
Binary files /dev/null and b/docs/assets/Alert/exampleios.gif differ
diff --git a/docs/assets/Button.png b/docs/assets/Button.png
new file mode 100644
index 0000000..da2a40c
Binary files /dev/null and b/docs/assets/Button.png differ
diff --git a/docs/assets/ConfigureReleaseScheme.png b/docs/assets/ConfigureReleaseScheme.png
new file mode 100644
index 0000000..b275096
Binary files /dev/null and b/docs/assets/ConfigureReleaseScheme.png differ
diff --git a/docs/assets/DatePickerIOS/example.gif b/docs/assets/DatePickerIOS/example.gif
new file mode 100644
index 0000000..3ed4e2f
Binary files /dev/null and b/docs/assets/DatePickerIOS/example.gif differ
diff --git a/docs/assets/DatePickerIOS/maximumDate.gif b/docs/assets/DatePickerIOS/maximumDate.gif
new file mode 100644
index 0000000..2839bfc
Binary files /dev/null and b/docs/assets/DatePickerIOS/maximumDate.gif differ
diff --git a/docs/assets/DatePickerIOS/minuteInterval.png b/docs/assets/DatePickerIOS/minuteInterval.png
new file mode 100644
index 0000000..d63258d
Binary files /dev/null and b/docs/assets/DatePickerIOS/minuteInterval.png differ
diff --git a/docs/assets/DatePickerIOS/mode.png b/docs/assets/DatePickerIOS/mode.png
new file mode 100644
index 0000000..586fd80
Binary files /dev/null and b/docs/assets/DatePickerIOS/mode.png differ
diff --git a/docs/assets/DeveloperMenu.png b/docs/assets/DeveloperMenu.png
new file mode 100644
index 0000000..662dfdc
Binary files /dev/null and b/docs/assets/DeveloperMenu.png differ
diff --git a/docs/assets/EmbeddedAppAndroid.png b/docs/assets/EmbeddedAppAndroid.png
new file mode 100644
index 0000000..fd1d3a6
Binary files /dev/null and b/docs/assets/EmbeddedAppAndroid.png differ
diff --git a/docs/assets/GettingStartedAVDManagerMacOS.png b/docs/assets/GettingStartedAVDManagerMacOS.png
new file mode 100644
index 0000000..c4c6fa5
Binary files /dev/null and b/docs/assets/GettingStartedAVDManagerMacOS.png differ
diff --git a/docs/assets/GettingStartedAVDManagerWindows.png b/docs/assets/GettingStartedAVDManagerWindows.png
new file mode 100644
index 0000000..e201dee
Binary files /dev/null and b/docs/assets/GettingStartedAVDManagerWindows.png differ
diff --git a/docs/assets/GettingStartedAndroidEnvironmentVariableANDROID_HOME.png b/docs/assets/GettingStartedAndroidEnvironmentVariableANDROID_HOME.png
new file mode 100644
index 0000000..27f4549
Binary files /dev/null and b/docs/assets/GettingStartedAndroidEnvironmentVariableANDROID_HOME.png differ
diff --git a/docs/assets/GettingStartedAndroidSDKManagerInstallsMacOS.png b/docs/assets/GettingStartedAndroidSDKManagerInstallsMacOS.png
new file mode 100644
index 0000000..522d8b4
Binary files /dev/null and b/docs/assets/GettingStartedAndroidSDKManagerInstallsMacOS.png differ
diff --git a/docs/assets/GettingStartedAndroidSDKManagerInstallsWindows.png b/docs/assets/GettingStartedAndroidSDKManagerInstallsWindows.png
new file mode 100644
index 0000000..0acde61
Binary files /dev/null and b/docs/assets/GettingStartedAndroidSDKManagerInstallsWindows.png differ
diff --git a/docs/assets/GettingStartedAndroidSDKManagerMacOS.png b/docs/assets/GettingStartedAndroidSDKManagerMacOS.png
new file mode 100644
index 0000000..9a145be
Binary files /dev/null and b/docs/assets/GettingStartedAndroidSDKManagerMacOS.png differ
diff --git a/docs/assets/GettingStartedAndroidSDKManagerSDKToolsMacOS.png b/docs/assets/GettingStartedAndroidSDKManagerSDKToolsMacOS.png
new file mode 100644
index 0000000..fc12636
Binary files /dev/null and b/docs/assets/GettingStartedAndroidSDKManagerSDKToolsMacOS.png differ
diff --git a/docs/assets/GettingStartedAndroidSDKManagerSDKToolsWindows.png b/docs/assets/GettingStartedAndroidSDKManagerSDKToolsWindows.png
new file mode 100644
index 0000000..8624567
Binary files /dev/null and b/docs/assets/GettingStartedAndroidSDKManagerSDKToolsWindows.png differ
diff --git a/docs/assets/GettingStartedAndroidSDKManagerWindows.png b/docs/assets/GettingStartedAndroidSDKManagerWindows.png
new file mode 100644
index 0000000..72a1024
Binary files /dev/null and b/docs/assets/GettingStartedAndroidSDKManagerWindows.png differ
diff --git a/docs/assets/GettingStartedAndroidStudioAVD.png b/docs/assets/GettingStartedAndroidStudioAVD.png
new file mode 100644
index 0000000..20d7626
Binary files /dev/null and b/docs/assets/GettingStartedAndroidStudioAVD.png differ
diff --git a/docs/assets/GettingStartedAndroidStudioWelcomeMacOS.png b/docs/assets/GettingStartedAndroidStudioWelcomeMacOS.png
new file mode 100644
index 0000000..264ba4b
Binary files /dev/null and b/docs/assets/GettingStartedAndroidStudioWelcomeMacOS.png differ
diff --git a/docs/assets/GettingStartedAndroidStudioWelcomeWindows.png b/docs/assets/GettingStartedAndroidStudioWelcomeWindows.png
new file mode 100644
index 0000000..160185b
Binary files /dev/null and b/docs/assets/GettingStartedAndroidStudioWelcomeWindows.png differ
diff --git a/docs/assets/GettingStartedAndroidSuccessMacOS.png b/docs/assets/GettingStartedAndroidSuccessMacOS.png
new file mode 100644
index 0000000..ec94209
Binary files /dev/null and b/docs/assets/GettingStartedAndroidSuccessMacOS.png differ
diff --git a/docs/assets/GettingStartedAndroidSuccessWindows.png b/docs/assets/GettingStartedAndroidSuccessWindows.png
new file mode 100644
index 0000000..fffb68d
Binary files /dev/null and b/docs/assets/GettingStartedAndroidSuccessWindows.png differ
diff --git a/docs/assets/GettingStartedCongratulations.png b/docs/assets/GettingStartedCongratulations.png
new file mode 100644
index 0000000..c600272
Binary files /dev/null and b/docs/assets/GettingStartedCongratulations.png differ
diff --git a/docs/assets/GettingStartedCreateAVDMacOS.png b/docs/assets/GettingStartedCreateAVDMacOS.png
new file mode 100644
index 0000000..f7292c0
Binary files /dev/null and b/docs/assets/GettingStartedCreateAVDMacOS.png differ
diff --git a/docs/assets/GettingStartedCreateAVDWindows.png b/docs/assets/GettingStartedCreateAVDWindows.png
new file mode 100644
index 0000000..5c742f4
Binary files /dev/null and b/docs/assets/GettingStartedCreateAVDWindows.png differ
diff --git a/docs/assets/GettingStartedCreateAVDx86MacOS.png b/docs/assets/GettingStartedCreateAVDx86MacOS.png
new file mode 100644
index 0000000..e645701
Binary files /dev/null and b/docs/assets/GettingStartedCreateAVDx86MacOS.png differ
diff --git a/docs/assets/GettingStartedCreateAVDx86Windows.png b/docs/assets/GettingStartedCreateAVDx86Windows.png
new file mode 100644
index 0000000..5a9a8a6
Binary files /dev/null and b/docs/assets/GettingStartedCreateAVDx86Windows.png differ
diff --git a/docs/assets/GettingStartedXcodeCommandLineTools.png b/docs/assets/GettingStartedXcodeCommandLineTools.png
new file mode 100644
index 0000000..021ab69
Binary files /dev/null and b/docs/assets/GettingStartedXcodeCommandLineTools.png differ
diff --git a/docs/assets/GettingStartediOSSuccess.png b/docs/assets/GettingStartediOSSuccess.png
new file mode 100644
index 0000000..5b761f7
Binary files /dev/null and b/docs/assets/GettingStartediOSSuccess.png differ
diff --git a/docs/assets/Inspector.gif b/docs/assets/Inspector.gif
new file mode 100644
index 0000000..b758973
Binary files /dev/null and b/docs/assets/Inspector.gif differ
diff --git a/docs/assets/KeyboardAvoidingView/example.gif b/docs/assets/KeyboardAvoidingView/example.gif
new file mode 100644
index 0000000..caf378e
Binary files /dev/null and b/docs/assets/KeyboardAvoidingView/example.gif differ
diff --git a/docs/assets/MaskedViewIOS/example.png b/docs/assets/MaskedViewIOS/example.png
new file mode 100644
index 0000000..52b23ba
Binary files /dev/null and b/docs/assets/MaskedViewIOS/example.png differ
diff --git a/docs/assets/NavigationStack-NavigatorIOS.gif b/docs/assets/NavigationStack-NavigatorIOS.gif
new file mode 100644
index 0000000..c1d56a1
Binary files /dev/null and b/docs/assets/NavigationStack-NavigatorIOS.gif differ
diff --git a/docs/assets/ObjectObserveError.png b/docs/assets/ObjectObserveError.png
new file mode 100644
index 0000000..3634969
Binary files /dev/null and b/docs/assets/ObjectObserveError.png differ
diff --git a/docs/assets/PerfUtil.png b/docs/assets/PerfUtil.png
new file mode 100644
index 0000000..187f114
Binary files /dev/null and b/docs/assets/PerfUtil.png differ
diff --git a/docs/assets/ReactDevTools.png b/docs/assets/ReactDevTools.png
new file mode 100644
index 0000000..baff06c
Binary files /dev/null and b/docs/assets/ReactDevTools.png differ
diff --git a/docs/assets/ReactDevToolsDollarR.gif b/docs/assets/ReactDevToolsDollarR.gif
new file mode 100644
index 0000000..373d80b
Binary files /dev/null and b/docs/assets/ReactDevToolsDollarR.gif differ
diff --git a/docs/assets/ReactDevToolsInspector.gif b/docs/assets/ReactDevToolsInspector.gif
new file mode 100644
index 0000000..c3540be
Binary files /dev/null and b/docs/assets/ReactDevToolsInspector.gif differ
diff --git a/docs/assets/RunningOnDeviceCodeSigning.png b/docs/assets/RunningOnDeviceCodeSigning.png
new file mode 100644
index 0000000..9519393
Binary files /dev/null and b/docs/assets/RunningOnDeviceCodeSigning.png differ
diff --git a/docs/assets/RunningOnDeviceReady.png b/docs/assets/RunningOnDeviceReady.png
new file mode 100644
index 0000000..ccf3b97
Binary files /dev/null and b/docs/assets/RunningOnDeviceReady.png differ
diff --git a/docs/assets/SegmentedControlIOS/enabled.png b/docs/assets/SegmentedControlIOS/enabled.png
new file mode 100644
index 0000000..2474658
Binary files /dev/null and b/docs/assets/SegmentedControlIOS/enabled.png differ
diff --git a/docs/assets/SegmentedControlIOS/example.gif b/docs/assets/SegmentedControlIOS/example.gif
new file mode 100644
index 0000000..af9a378
Binary files /dev/null and b/docs/assets/SegmentedControlIOS/example.gif differ
diff --git a/docs/assets/SegmentedControlIOS/momentary.gif b/docs/assets/SegmentedControlIOS/momentary.gif
new file mode 100644
index 0000000..45d525c
Binary files /dev/null and b/docs/assets/SegmentedControlIOS/momentary.gif differ
diff --git a/docs/assets/SegmentedControlIOS/tintColor.png b/docs/assets/SegmentedControlIOS/tintColor.png
new file mode 100644
index 0000000..929812b
Binary files /dev/null and b/docs/assets/SegmentedControlIOS/tintColor.png differ
diff --git a/docs/assets/SystraceBadCreateUI.png b/docs/assets/SystraceBadCreateUI.png
new file mode 100644
index 0000000..b102854
Binary files /dev/null and b/docs/assets/SystraceBadCreateUI.png differ
diff --git a/docs/assets/SystraceBadJS.png b/docs/assets/SystraceBadJS.png
new file mode 100644
index 0000000..eb6f4e7
Binary files /dev/null and b/docs/assets/SystraceBadJS.png differ
diff --git a/docs/assets/SystraceBadJS2.png b/docs/assets/SystraceBadJS2.png
new file mode 100644
index 0000000..c4b9527
Binary files /dev/null and b/docs/assets/SystraceBadJS2.png differ
diff --git a/docs/assets/SystraceBadUI.png b/docs/assets/SystraceBadUI.png
new file mode 100644
index 0000000..3a52c26
Binary files /dev/null and b/docs/assets/SystraceBadUI.png differ
diff --git a/docs/assets/SystraceExample.png b/docs/assets/SystraceExample.png
new file mode 100644
index 0000000..3e5ba18
Binary files /dev/null and b/docs/assets/SystraceExample.png differ
diff --git a/docs/assets/SystraceHighlightVSync.png b/docs/assets/SystraceHighlightVSync.png
new file mode 100644
index 0000000..dc7595a
Binary files /dev/null and b/docs/assets/SystraceHighlightVSync.png differ
diff --git a/docs/assets/SystraceJSThreadExample.png b/docs/assets/SystraceJSThreadExample.png
new file mode 100644
index 0000000..736af7d
Binary files /dev/null and b/docs/assets/SystraceJSThreadExample.png differ
diff --git a/docs/assets/SystraceNativeModulesThreadExample.png b/docs/assets/SystraceNativeModulesThreadExample.png
new file mode 100644
index 0000000..7e919f2
Binary files /dev/null and b/docs/assets/SystraceNativeModulesThreadExample.png differ
diff --git a/docs/assets/SystraceRenderThreadExample.png b/docs/assets/SystraceRenderThreadExample.png
new file mode 100644
index 0000000..2fa05bd
Binary files /dev/null and b/docs/assets/SystraceRenderThreadExample.png differ
diff --git a/docs/assets/SystraceUIThreadExample.png b/docs/assets/SystraceUIThreadExample.png
new file mode 100644
index 0000000..4883e85
Binary files /dev/null and b/docs/assets/SystraceUIThreadExample.png differ
diff --git a/docs/assets/SystraceWellBehaved.png b/docs/assets/SystraceWellBehaved.png
new file mode 100644
index 0000000..7d54905
Binary files /dev/null and b/docs/assets/SystraceWellBehaved.png differ
diff --git a/docs/assets/TodayWidgetUnableToLoad.jpg b/docs/assets/TodayWidgetUnableToLoad.jpg
new file mode 100644
index 0000000..54e3650
Binary files /dev/null and b/docs/assets/TodayWidgetUnableToLoad.jpg differ
diff --git a/docs/assets/XcodeBuildIP.png b/docs/assets/XcodeBuildIP.png
new file mode 100644
index 0000000..9308690
Binary files /dev/null and b/docs/assets/XcodeBuildIP.png differ
diff --git a/docs/assets/buttonExample.png b/docs/assets/buttonExample.png
new file mode 100644
index 0000000..345819b
Binary files /dev/null and b/docs/assets/buttonExample.png differ
diff --git a/docs/assets/favicon.png b/docs/assets/favicon.png
new file mode 100644
index 0000000..22c120d
Binary files /dev/null and b/docs/assets/favicon.png differ
diff --git a/docs/assets/react-native-add-react-native-integration-example-high-scores.png b/docs/assets/react-native-add-react-native-integration-example-high-scores.png
new file mode 100644
index 0000000..64b85c4
Binary files /dev/null and b/docs/assets/react-native-add-react-native-integration-example-high-scores.png differ
diff --git a/docs/assets/react-native-add-react-native-integration-example-home-screen.png b/docs/assets/react-native-add-react-native-integration-example-home-screen.png
new file mode 100644
index 0000000..42bd9d5
Binary files /dev/null and b/docs/assets/react-native-add-react-native-integration-example-home-screen.png differ
diff --git a/docs/assets/react-native-add-react-native-integration-link.png b/docs/assets/react-native-add-react-native-integration-link.png
new file mode 100644
index 0000000..761c0bc
Binary files /dev/null and b/docs/assets/react-native-add-react-native-integration-link.png differ
diff --git a/docs/assets/react-native-add-react-native-integration-wire-up.png b/docs/assets/react-native-add-react-native-integration-wire-up.png
new file mode 100644
index 0000000..207ebe9
Binary files /dev/null and b/docs/assets/react-native-add-react-native-integration-wire-up.png differ
diff --git a/docs/assets/react-native-existing-app-integration-ios-before.png b/docs/assets/react-native-existing-app-integration-ios-before.png
new file mode 100644
index 0000000..39361f7
Binary files /dev/null and b/docs/assets/react-native-existing-app-integration-ios-before.png differ
diff --git a/docs/asyncstorage.md b/docs/asyncstorage.md
new file mode 100644
index 0000000..9eb74ce
--- /dev/null
+++ b/docs/asyncstorage.md
@@ -0,0 +1,366 @@
+---
+id: asyncstorage
+title: AsyncStorage
+---
+
+`AsyncStorage` is a simple, unencrypted, asynchronous, persistent, key-value storage system that is global to the app. It should be used instead of LocalStorage.
+
+It is recommended that you use an abstraction on top of `AsyncStorage` instead of `AsyncStorage` directly for anything more than light usage since it operates globally.
+
+On iOS, `AsyncStorage` is backed by native code that stores small values in a serialized dictionary and larger values in separate files. On Android, `AsyncStorage` will use either [RocksDB](http://rocksdb.org/) or SQLite based on what is available.
+
+The `AsyncStorage` JavaScript code is a simple facade that provides a clear JavaScript API, real `Error` objects, and simple non-multi functions. Each method in the API returns a `Promise` object.
+
+Importing the `AsyncStorage` library:
+
+```javascript
+import {AsyncStorage} from 'react-native';
+```
+
+Persisting data:
+
+```javascript
+_storeData = async () => {
+ try {
+ await AsyncStorage.setItem('@MySuperStore:key', 'I like to save it.');
+ } catch (error) {
+ // Error saving data
+ }
+};
+```
+
+Fetching data:
+
+```javascript
+_retrieveData = async () => {
+ try {
+ const value = await AsyncStorage.getItem('TASKS');
+ if (value !== null) {
+ // We have data!!
+ console.log(value);
+ }
+ } catch (error) {
+ // Error retrieving data
+ }
+};
+```
+
+### Methods
+
+* [`getItem`](asyncstorage.md#getitem)
+* [`setItem`](asyncstorage.md#setitem)
+* [`removeItem`](asyncstorage.md#removeitem)
+* [`mergeItem`](asyncstorage.md#mergeitem)
+* [`clear`](asyncstorage.md#clear)
+* [`getAllKeys`](asyncstorage.md#getallkeys)
+* [`flushGetRequests`](asyncstorage.md#flushgetrequests)
+* [`multiGet`](asyncstorage.md#multiget)
+* [`multiSet`](asyncstorage.md#multiset)
+* [`multiRemove`](asyncstorage.md#multiremove)
+* [`multiMerge`](asyncstorage.md#multimerge)
+
+---
+
+# Reference
+
+## Methods
+
+### `getItem()`
+
+```javascript
+static getItem(key: string, [callback]: ?(error: ?Error, result: ?string) => void)
+```
+
+Fetches an item for a `key` and invokes a callback upon completion. Returns a `Promise` object.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ----------------------------------------- | -------- | ----------------------------------------------------------------- |
+| key | string | Yes | Key of the item to fetch. |
+| callback | ?(error: ?Error, result: ?string) => void | No | Function that will be called with a result if found or any error. |
+
+---
+
+### `setItem()`
+
+```javascript
+static setItem(key: string, value: string, [callback]: ?(error: ?Error) => void)
+```
+
+Sets the value for a `key` and invokes a callback upon completion. Returns a `Promise` object.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ------------------------ | -------- | -------------------------------------------- |
+| key | string | Yes | Key of the item to set. |
+| value | string | Yes | Value to set for the `key`. |
+| callback | ?(error: ?Error) => void | No | Function that will be called with any error. |
+
+---
+
+### `removeItem()`
+
+```javascript
+static removeItem(key: string, [callback]: ?(error: ?Error) => void)
+```
+
+Removes an item for a `key` and invokes a callback upon completion. Returns a `Promise` object.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ------------------------ | -------- | -------------------------------------------- |
+| key | string | Yes | Key of the item to remove. |
+| callback | ?(error: ?Error) => void | No | Function that will be called with any error. |
+
+---
+
+### `mergeItem()`
+
+```javascript
+static mergeItem(key: string, value: string, [callback]: ?(error: ?Error) => void)
+```
+
+Merges an existing `key` value with an input value, assuming both values are stringified JSON. Returns a `Promise` object.
+
+**NOTE:** This is not supported by all native implementations.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ------------------------ | -------- | -------------------------------------------- |
+| key | string | Yes | Key of the item to modify. |
+| value | string | Yes | New value to merge for the `key`. |
+| callback | ?(error: ?Error) => void | No | Function that will be called with any error. |
+
+Example:
+
+```javascript
+let UID123_object = {
+ name: 'Chris',
+ age: 30,
+ traits: {hair: 'brown', eyes: 'brown'},
+};
+// You only need to define what will be added or updated
+let UID123_delta = {
+ age: 31,
+ traits: {eyes: 'blue', shoe_size: 10},
+};
+
+AsyncStorage.setItem('UID123', JSON.stringify(UID123_object), () => {
+ AsyncStorage.mergeItem('UID123', JSON.stringify(UID123_delta), () => {
+ AsyncStorage.getItem('UID123', (err, result) => {
+ console.log(result);
+ });
+ });
+});
+
+// Console log result:
+// => {'name':'Chris','age':31,'traits':
+// {'shoe_size':10,'hair':'brown','eyes':'blue'}}
+```
+
+---
+
+### `clear()`
+
+```javascript
+static clear([callback]: ?(error: ?Error) => void)
+```
+
+Erases _all_ `AsyncStorage` for all clients, libraries, etc. You probably don't want to call this; use `removeItem` or `multiRemove` to clear only your app's keys. Returns a `Promise` object.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ------------------------ | -------- | -------------------------------------------- |
+| callback | ?(error: ?Error) => void | No | Function that will be called with any error. |
+
+---
+
+### `getAllKeys()`
+
+```javascript
+static getAllKeys([callback]: ?(error: ?Error, keys: ?Array) => void)
+```
+
+Gets _all_ keys known to your app; for all callers, libraries, etc. Returns a `Promise` object.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ---------------------------------------------- | -------- | --------------------------------------------------------------- |
+| callback | ?(error: ?Error, keys: ?Array) => void | No | Function that will be called with all keys found and any error. |
+
+---
+
+### `flushGetRequests()`
+
+```javascript
+static flushGetRequests(): [object Object]
+```
+
+Flushes any pending requests using a single batch call to get the data.
+
+---
+
+### `multiGet()`
+
+```javascript
+static multiGet(keys: Array, [callback]: ?(errors: ?Array, result: ?Array>) => void)
+```
+
+This allows you to batch the fetching of items given an array of `key` inputs. Your callback will be invoked with an array of corresponding key-value pairs found:
+
+```
+multiGet(['k1', 'k2'], cb) -> cb([['k1', 'val1'], ['k2', 'val2']])
+```
+
+The method returns a `Promise` object.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | --------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
+| keys | Array | Yes | Array of key for the items to get. |
+| callback | ?(errors: ?Array, result: ?Array>) => void | No | Function that will be called with a key-value array of the results, plus an array of any key-specific errors found. |
+
+Example:
+
+```javascript
+AsyncStorage.getAllKeys((err, keys) => {
+ AsyncStorage.multiGet(keys, (err, stores) => {
+ stores.map((result, i, store) => {
+ // get at each store's key/value so you can work with it
+ let key = store[i][0];
+ let value = store[i][1];
+ });
+ });
+});
+```
+
+---
+
+### `multiSet()`
+
+```javascript
+static multiSet(keyValuePairs: Array>, [callback]: ?(errors: ?Array) => void)
+```
+
+Use this as a batch operation for storing multiple key-value pairs. When the operation completes you'll get a single callback with any errors:
+
+```
+multiSet([['k1', 'val1'], ['k2', 'val2']], cb);
+```
+
+The method returns a `Promise` object.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------------- | -------------------------------- | -------- | ---------------------------------------------------------------------------- |
+| keyValuePairs | Array> | Yes | Array of key-value array for the items to set. |
+| callback | ?(errors: ?Array) => void | No | Function that will be called with an array of any key-specific errors found. |
+
+---
+
+### `multiRemove()`
+
+```javascript
+static multiRemove(keys: Array, [callback]: ?(errors: ?Array) => void)
+```
+
+Call this to batch the deletion of all keys in the `keys` array. Returns a `Promise` object.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------------------------------- | -------- | ----------------------------------------------------------------------- |
+| keys | Array | Yes | Array of key for the items to delete. |
+| callback | ?(errors: ?Array) => void | No | Function that will be called an array of any key-specific errors found. |
+
+Example:
+
+```javascript
+let keys = ['k1', 'k2'];
+AsyncStorage.multiRemove(keys, (err) => {
+ // keys k1 & k2 removed, if they existed
+ // do most stuff after removal (if you want)
+});
+```
+
+---
+
+### `multiMerge()`
+
+```javascript
+static multiMerge(keyValuePairs: Array>, [callback]: ?(errors: ?Array) => void)
+```
+
+Batch operation to merge in existing and new values for a given set of keys. This assumes that the values are stringified JSON. Returns a `Promise` object.
+
+**NOTE**: This is not supported by all native implementations.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------------- | -------------------------------- | -------- | ---------------------------------------------------------------------------- |
+| keyValuePairs | Array> | Yes | Array of key-value array for the items to merge. |
+| callback | ?(errors: ?Array) => void | No | Function that will be called with an array of any key-specific errors found. |
+
+Example:
+
+```javascript
+// first user, initial values
+let UID234_object = {
+ name: 'Chris',
+ age: 30,
+ traits: {hair: 'brown', eyes: 'brown'},
+};
+
+// first user, delta values
+let UID234_delta = {
+ age: 31,
+ traits: {eyes: 'blue', shoe_size: 10},
+};
+
+// second user, initial values
+let UID345_object = {
+ name: 'Marge',
+ age: 25,
+ traits: {hair: 'blonde', eyes: 'blue'},
+};
+
+// second user, delta values
+let UID345_delta = {
+ age: 26,
+ traits: {eyes: 'green', shoe_size: 6},
+};
+
+let multi_set_pairs = [
+ ['UID234', JSON.stringify(UID234_object)],
+ ['UID345', JSON.stringify(UID345_object)],
+];
+let multi_merge_pairs = [
+ ['UID234', JSON.stringify(UID234_delta)],
+ ['UID345', JSON.stringify(UID345_delta)],
+];
+
+AsyncStorage.multiSet(multi_set_pairs, (err) => {
+ AsyncStorage.multiMerge(multi_merge_pairs, (err) => {
+ AsyncStorage.multiGet(['UID234', 'UID345'], (err, stores) => {
+ stores.map((result, i, store) => {
+ let key = store[i][0];
+ let val = store[i][1];
+ console.log(key, val);
+ });
+ });
+ });
+});
+
+// Console log results:
+// => UID234 {"name":"Chris","age":31,"traits":{"shoe_size":10,"hair":"brown","eyes":"blue"}}
+// => UID345 {"name":"Marge","age":26,"traits":{"shoe_size":6,"hair":"blonde","eyes":"green"}}
+```
diff --git a/docs/backandroid.md b/docs/backandroid.md
new file mode 100644
index 0000000..2982c20
--- /dev/null
+++ b/docs/backandroid.md
@@ -0,0 +1,40 @@
+---
+id: backandroid
+title: BackAndroid
+---
+
+Deprecated. Use BackHandler instead.
+
+### Methods
+
+* [`exitApp`](backandroid.md#exitapp)
+* [`addEventListener`](backandroid.md#addeventlistener)
+* [`removeEventListener`](backandroid.md#removeeventlistener)
+
+---
+
+# Reference
+
+## Methods
+
+### `exitApp()`
+
+```javascript
+static exitApp()
+```
+
+---
+
+### `addEventListener()`
+
+```javascript
+static addEventListener(eventName, handler)
+```
+
+---
+
+### `removeEventListener()`
+
+```javascript
+static removeEventListener(eventName, handler)
+```
diff --git a/docs/backhandler.md b/docs/backhandler.md
new file mode 100644
index 0000000..3e7a7bb
--- /dev/null
+++ b/docs/backhandler.md
@@ -0,0 +1,95 @@
+---
+id: backhandler
+title: BackHandler
+---
+
+Detect hardware button presses for back navigation.
+
+Android: Detect hardware back button presses, and programmatically invoke the default back button functionality to exit the app if there are no listeners or if none of the listeners return true.
+
+tvOS: Detect presses of the menu button on the TV remote. (Still to be implemented: programmatically disable menu button handling functionality to exit the app if there are no listeners or if none of the listeners return true.)
+
+iOS: Not applicable.
+
+The event subscriptions are called in reverse order (i.e. last registered subscription first), and if one subscription returns true then subscriptions registered earlier will not be called.
+
+Example:
+
+```javascript
+BackHandler.addEventListener('hardwareBackPress', function() {
+ // this.onMainScreen and this.goBack are just examples, you need to use your own implementation here
+ // Typically you would use the navigator here to go to the last state.
+
+ if (!this.onMainScreen()) {
+ this.goBack();
+ return true;
+ }
+ return false;
+});
+```
+
+Lifecycle example:
+
+```javascript
+ componentDidMount() {
+ BackHandler.addEventListener('hardwareBackPress', this.handleBackPress);
+ }
+
+ componentWillUnmount() {
+ BackHandler.removeEventListener('hardwareBackPress', this.handleBackPress);
+ }
+
+ handleBackPress = () => {
+ this.goBack(); // works best when the goBack is async
+ return true;
+ }
+```
+
+Lifecycle alternative:
+
+```javascript
+ componentDidMount() {
+ this.backHandler = BackHandler.addEventListener('hardwareBackPress', () => {
+ this.goBack(); // works best when the goBack is async
+ return true;
+ });
+ }
+
+ componentWillUnmount() {
+ this.backHandler.remove();
+ }
+```
+
+### Methods
+
+* [`exitApp`](backhandler.md#exitapp)
+* [`addEventListener`](backhandler.md#addeventlistener)
+* [`removeEventListener`](backhandler.md#removeeventlistener)
+
+---
+
+# Reference
+
+## Methods
+
+### `exitApp()`
+
+```javascript
+static exitApp()
+```
+
+---
+
+### `addEventListener()`
+
+```javascript
+static addEventListener(eventName, handler)
+```
+
+---
+
+### `removeEventListener()`
+
+```javascript
+static removeEventListener(eventName, handler)
+```
diff --git a/docs/building-for-apple-tv.md b/docs/building-for-apple-tv.md
new file mode 100644
index 0000000..d717a50
--- /dev/null
+++ b/docs/building-for-apple-tv.md
@@ -0,0 +1,314 @@
+---
+id: building-for-apple-tv
+title: Building For TV Devices
+---
+
+
+
+TV devices support has been implemented with the intention of making existing React Native applications "just work" on Apple TV and Android TV, with few or no changes needed in the JavaScript code for the applications.
+
+
+
+
+
+ iOS
+
+
+ Android
+
+
+
+
+
+
+The RNTester app supports Apple TV; use the `RNTester-tvOS` build target to build for tvOS.
+
+## Build changes
+
+* _Native layer_: React Native Xcode projects all now have Apple TV build targets, with names ending in the string '-tvOS'.
+
+* _react-native init_: New React Native projects created with `react-native init` will have Apple TV target automatically created in their XCode projects.
+
+* _JavaScript layer_: Support for Apple TV has been added to `Platform.ios.js`. You can check whether code is running on AppleTV by doing
+
+```javascript
+var Platform = require('Platform');
+var running_on_tv = Platform.isTV;
+
+// If you want to be more specific and only detect devices running tvOS
+// (but no Android TV devices) you can use:
+var running_on_apple_tv = Platform.isTVOS;
+```
+
+
+
+## Build changes
+
+* _Native layer_: To run React Native project on Android TV make sure to make the following changes to `AndroidManifest.xml`
+
+```xml
+
+
+ ...
+
+ ...
+
+
+
+ ...
+
+```
+
+* _JavaScript layer_: Support for Android TV has been added to `Platform.android.js`. You can check whether code is running on Android TV by doing
+
+```js
+var Platform = require('Platform');
+var running_on_android_tv = Platform.isTV;
+```
+
+
+
+## Code changes
+
+
+
+* _General support for tvOS_: Apple TV specific changes in native code are all wrapped by the TARGET_OS_TV define. These include changes to suppress APIs that are not supported on tvOS (e.g. web views, sliders, switches, status bar, etc.), and changes to support user input from the TV remote or keyboard.
+
+* _Common codebase_: Since tvOS and iOS share most Objective-C and JavaScript code in common, most documentation for iOS applies equally to tvOS.
+
+* _Access to touchable controls_: When running on Apple TV, the native view class is `RCTTVView`, which has additional methods to make use of the tvOS focus engine. The `Touchable` mixin has code added to detect focus changes and use existing methods to style the components properly and initiate the proper actions when the view is selected using the TV remote, so `TouchableWithoutFeedback`, `TouchableHighlight` and `TouchableOpacity` will "just work". In particular:
+
+ * `onFocus` will be executed when the touchable view goes into focus
+ * `onBlur` will be executed when the touchable view goes out of focus
+ * `onPress` will be executed when the touchable view is actually selected by pressing the "select" button on the TV remote.
+
+
+
+* _Access to touchable controls_: When running on Android TV the Android framework will automatically apply a directional navigation scheme based on relative position of focusable elements in your views. The `Touchable` mixin has code added to detect focus changes and use existing methods to style the components properly and initiate the proper actions when the view is selected using the TV remote, so `TouchableWithoutFeedback`, `TouchableHighlight`, `TouchableOpacity` and `TouchableNativeFeedback` will "just work". In particular:
+
+ * `onFocus` will be executed when the touchable view goes into focus
+ * `onBlur` will be executed when the touchable view goes out of focus
+ * `onPress` will be executed when the touchable view is actually selected by pressing the "select" button on the TV remote.
+
+
+
+* _TV remote/keyboard input_: A new native class, `RCTTVRemoteHandler`, sets up gesture recognizers for TV remote events. When TV remote events occur, this class fires notifications that are picked up by `RCTTVNavigationEventEmitter` (a subclass of `RCTEventEmitter`), that fires a JS event. This event will be picked up by instances of the `TVEventHandler` JavaScript object. Application code that needs to implement custom handling of TV remote events can create an instance of `TVEventHandler` and listen for these events, as in the following code:
+
+
+
+* _TV remote/keyboard input_: A new native class, `ReactAndroidTVRootViewHelper`, sets up key events handlers for TV remote events. When TV remote events occur, this class fires a JS event. This event will be picked up by instances of the `TVEventHandler` JavaScript object. Application code that needs to implement custom handling of TV remote events can create an instance of `TVEventHandler` and listen for these events, as in the following code:
+
+
+
+```javascript
+var TVEventHandler = require('TVEventHandler');
+
+class Game2048 extends React.Component {
+ _tvEventHandler: any;
+
+ _enableTVEventHandler() {
+ this._tvEventHandler = new TVEventHandler();
+ this._tvEventHandler.enable(this, function(cmp, evt) {
+ if (evt && evt.eventType === 'right') {
+ cmp.setState({board: cmp.state.board.move(2)});
+ } else if(evt && evt.eventType === 'up') {
+ cmp.setState({board: cmp.state.board.move(1)});
+ } else if(evt && evt.eventType === 'left') {
+ cmp.setState({board: cmp.state.board.move(0)});
+ } else if(evt && evt.eventType === 'down') {
+ cmp.setState({board: cmp.state.board.move(3)});
+ } else if(evt && evt.eventType === 'playPause') {
+ cmp.restartGame();
+ }
+ });
+ }
+
+ _disableTVEventHandler() {
+ if (this._tvEventHandler) {
+ this._tvEventHandler.disable();
+ delete this._tvEventHandler;
+ }
+ }
+
+ componentDidMount() {
+ this._enableTVEventHandler();
+ }
+
+ componentWillUnmount() {
+ this._disableTVEventHandler();
+ }
+```
+
+
+
+* _Dev Menu support_: On the simulator, cmd-D will bring up the developer menu, just like on iOS. To bring it up on a real Apple TV device, make a long press on the play/pause button on the remote. (Please do not shake the Apple TV device, that will not work :) )
+
+* _TV remote animations_: `RCTTVView` native code implements Apple-recommended parallax animations to help guide the eye as the user navigates through views. The animations can be disabled or adjusted with new optional view properties.
+
+* _Back navigation with the TV remote menu button_: The `BackHandler` component, originally written to support the Android back button, now also supports back navigation on the Apple TV using the menu button on the TV remote.
+
+* _TabBarIOS behavior_: The `TabBarIOS` component wraps the native `UITabBar` API, which works differently on Apple TV. To avoid jittery rerendering of the tab bar in tvOS (see [this issue](https://github.com/facebook/react-native/issues/15081)), the selected tab bar item can only be set from Javascript on initial render, and is controlled after that by the user through native code.
+
+
+
+* _Dev Menu support_: On the simulator, cmd-M will bring up the developer menu, just like on Android. To bring it up on a real Android TV device, press the menu button or long press the fast-forward button on the remote. (Please do not shake the Android TV device, that will not work :) )
+
+
+
+* _Known issues_:
+
+ * [ListView scrolling](https://github.com/facebook/react-native/issues/12793). The issue can be easily worked around by setting `removeClippedSubviews` to false in ListView and similar components. For more discussion of this issue, see [this PR](https://github.com/facebook/react-native/pull/12944).
+
+
+
+* _Known issues_:
+
+ * `InputText` components do not work for now (i.e. they cannot receive focus).
+
+
diff --git a/docs/building-from-source.md b/docs/building-from-source.md
new file mode 100644
index 0000000..031ae15
--- /dev/null
+++ b/docs/building-from-source.md
@@ -0,0 +1,152 @@
+---
+id: building-from-source
+title: Building React Native from source
+---
+
+You will need to build React Native from source if you want to work on a new feature/bug fix, try out the latest features which are not released yet, or maintain your own fork with patches that cannot be merged to the core.
+
+## Android
+
+### Prerequisites
+
+Assuming you have the Android SDK installed, run `android` to open the Android SDK Manager.
+
+Make sure you have the following installed:
+
+1. Android SDK version 28 (compileSdkVersion in [`build.gradle`](https://github.com/facebook/react-native/blob/master/ReactAndroid/build.gradle))
+2. SDK build tools version 28.0.3 (buildToolsVersion in [`build.gradle`](https://github.com/facebook/react-native/blob/master/ReactAndroid/build.gradle))
+3. Android Support Repository >= 28 (for Android Support Library)
+4. Android NDK (download links and installation instructions below)
+
+#### [Point Gradle to your Android SDK](#gradle-android-sdk):
+
+**Step 1:** Set environment variables through your local shell.
+
+Note: Files may vary based on shell flavor. See below for examples from common shells.
+
+* bash: `.bash_profile` or `.bashrc`
+* zsh: `.zprofile` or `.zshrc`
+* ksh: `.profile` or `$ENV`
+
+Example:
+
+```
+export ANDROID_SDK=/Users/your_unix_name/android-sdk-macosx
+export ANDROID_NDK=/Users/your_unix_name/android-ndk/android-ndk-r17c
+```
+
+**Step 2:** Create a `local.properties` file in the `android` directory of your react-native app with the following contents:
+
+Example:
+
+```
+sdk.dir=/Users/your_unix_name/android-sdk-macosx
+ndk.dir=/Users/your_unix_name/android-ndk/android-ndk-r17c
+```
+
+#### Download links for Android NDK
+
+1. Mac OS (64-bit) - http://dl.google.com/android/repository/android-ndk-r17c-darwin-x86_64.zip
+2. Linux (64-bit) - http://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip
+3. Windows (64-bit) - http://dl.google.com/android/repository/android-ndk-r17c-windows-x86_64.zip
+4. Windows (32-bit) - http://dl.google.com/android/repository/android-ndk-r17c-windows-x86.zip
+
+You can find further instructions on the [official page](https://developer.android.com/ndk/index.html).
+
+### Building the source
+
+#### 1. Installing the fork
+
+First, you need to install `react-native` from your fork. For example, to install the master branch from the official repo, run the following:
+
+```sh
+npm install --save github:facebook/react-native#master
+```
+
+Alternatively, you can clone the repo to your `node_modules` directory and run `npm install` inside the cloned repo.
+
+#### 2. Adding gradle dependencies
+
+Add `gradle-download-task` as dependency in `android/build.gradle`:
+
+```gradle
+...
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.2.1'
+ classpath 'de.undercouch:gradle-download-task:3.4.3'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+...
+```
+
+#### 3. Adding the `:ReactAndroid` project
+
+Add the `:ReactAndroid` project in `android/settings.gradle`:
+
+```gradle
+...
+include ':ReactAndroid'
+
+project(':ReactAndroid').projectDir = new File(
+ rootProject.projectDir, '../node_modules/react-native/ReactAndroid')
+...
+```
+
+Modify your `android/app/build.gradle` to use the `:ReactAndroid` project instead of the pre-compiled library, e.g. - replace `implementation 'com.facebook.react:react-native:+'` with `implementation project(':ReactAndroid')`:
+
+```gradle
+...
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}'
+
+ implementation project(':ReactAndroid')
+
+ ...
+}
+...
+```
+
+#### 4. Making 3rd-party modules use your fork
+
+If you use 3rd-party React Native modules, you need to override their dependencies so that they don't bundle the pre-compiled library. Otherwise you'll get an error while compiling - `Error: more than one library with package name 'com.facebook.react'`.
+
+Modify your `android/app/build.gradle`, and add:
+
+```gradle
+configurations.all {
+ exclude group: 'com.facebook.react', module: 'react-native'
+}
+```
+
+### Building from Android Studio
+
+From the Welcome screen of Android Studio choose "Import project" and select the `android` folder of your app.
+
+You should be able to use the _Run_ button to run your app on a device. Android Studio won't start the packager automatically, you'll need to start it by running `npm start` on the command line.
+
+### Additional notes
+
+Building from source can take a long time, especially for the first build, as it needs to download ~200 MB of artifacts and compile the native code. Every time you update the `react-native` version from your repo, the build directory may get deleted, and all the files are re-downloaded. To avoid this, you might want to change your build directory path by editing the `~/.gradle/init.gradle` file:
+
+```gradle
+gradle.projectsLoaded {
+ rootProject.allprojects {
+ buildDir = "/path/to/build/directory/${rootProject.name}/${project.name}"
+ }
+}
+```
+
+### Troubleshooting
+
+Gradle build fails in `ndk-build`. See the section about `local.properties` file above.
+
+## Testing your Changes
+
+If you made changes to React Native and submit a pull request, all tests will run on your pull request automatically. To run the tests locally, see [Testing your Changes](testing.md).
+
+## Making your changes available
+
+See the [Publishing your own version of react native](publishing.md) for several options to make your changes available for your and other app projects.
diff --git a/docs/button.md b/docs/button.md
new file mode 100644
index 0000000..0304b6b
--- /dev/null
+++ b/docs/button.md
@@ -0,0 +1,108 @@
+---
+id: button
+title: Button
+---
+
+A basic button component that should render nicely on any platform. Supports a minimal level of customization.
+
+
+
+If this button doesn't look right for your app, you can build your own button using [TouchableOpacity](touchableopacity.md) or [TouchableNativeFeedback](touchablenativefeedback.md). For inspiration, look at the [source code for this button component](https://github.com/facebook/react-native/blob/master/Libraries/Components/Button.js). Or, take a look at the [wide variety of button components built by the community](https://js.coach/react-native?search=button).
+
+Example usage:
+
+```javascript
+import { Button } from 'react-native';
+...
+
+
+```
+
+### Props
+
+* [`onPress`](button.md#onpress)
+* [`title`](button.md#title)
+* [`accessibilityLabel`](button.md#accessibilitylabel)
+* [`color`](button.md#color)
+* [`disabled`](button.md#disabled)
+* [`testID`](button.md#testid)
+* [`hasTVPreferredFocus`](button.md#hastvpreferredfocus)
+
+---
+
+# Reference
+
+## Props
+
+### `onPress`
+
+Handler to be called when the user taps the button
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+---
+
+### `title`
+
+Text to display inside the button
+
+| Type | Required |
+| ------ | -------- |
+| string | Yes |
+
+---
+
+### `accessibilityLabel`
+
+Text to display for blindness accessibility features
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `color`
+
+Color of the text (iOS), or background color of the button (Android)
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `disabled`
+
+If true, disable all interactions for this component.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `hasTVPreferredFocus`
+
+_(Apple TV only)_ TV preferred focus (see documentation for the View component).
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
diff --git a/docs/cameraroll.md b/docs/cameraroll.md
new file mode 100644
index 0000000..d91df73
--- /dev/null
+++ b/docs/cameraroll.md
@@ -0,0 +1,145 @@
+---
+id: cameraroll
+title: CameraRoll
+---
+
+`CameraRoll` provides access to the local camera roll or photo library.
+
+On iOS, the `CameraRoll` API requires the `RCTCameraRoll` library to be linked. You can refer to [Linking Libraries (iOS)](linking-libraries-ios.md) to learn more.
+
+### Permissions
+
+The user's permission is required in order to access the Camera Roll on devices running iOS 10 or later. Add the `NSPhotoLibraryUsageDescription` key in your `Info.plist` with a string that describes how your app will use this data. This key will appear as `Privacy - Photo Library Usage Description` in Xcode.
+
+If you are targeting devices running iOS 11 or later, you will also need to add the `NSPhotoLibraryAddUsageDescription` key in your `Info.plist`. Use this key to define a string that describes how your app will use this data. By adding this key to your `Info.plist`, you will be able to request write-only access permission from the user. If you try to save to the camera roll without this permission, your app will exit.
+
+### Methods
+
+* [`saveToCameraRoll`](cameraroll.md#savetocameraroll)
+* [`getPhotos`](cameraroll.md#getphotos)
+
+---
+
+# Reference
+
+## Methods
+
+### `saveToCameraRoll()`
+
+```javascript
+CameraRoll.saveToCameraRoll(tag, [type]);
+```
+
+Saves the photo or video to the camera roll or photo library.
+
+On Android, the tag must be a local image or video URI, such as `"file:///sdcard/img.png"`.
+
+On iOS, the tag can be any image URI (including local, remote asset-library and base64 data URIs) or a local video file URI (remote or data URIs are not supported for saving video at this time).
+
+If the tag has a file extension of .mov or .mp4, it will be inferred as a video. Otherwise it will be treated as a photo. To override the automatic choice, you can pass an optional `type` parameter that must be one of 'photo' or 'video'.
+
+Returns a Promise which will resolve with the new URI.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ---------------------- | -------- | ---------------------------------------------------------- |
+| tag | string | Yes | See above. |
+| type | enum('photo', 'video') | No | Overrides automatic detection based on the file extension. |
+
+---
+
+### `getPhotos()`
+
+```javascript
+CameraRoll.getPhotos(params);
+```
+
+Returns a Promise with photo identifier objects from the local camera roll of the device matching shape defined by `getPhotosReturnChecker`.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ------------------------------------------------ |
+| params | object | Yes | Expects a params with the shape described below. |
+
+* `first` : {number} : The number of photos wanted in reverse order of the photo application (i.e. most recent first for SavedPhotos).
+* `after` : {string} : A cursor that matches `page_info { end_cursor }` returned from a previous call to `getPhotos`.
+* `groupTypes` : {string} : Specifies which group types to filter the results to. Valid values are:
+ * `Album`
+ * `All`
+ * `Event`
+ * `Faces`
+ * `Library`
+ * `PhotoStream`
+ * `SavedPhotos` // default
+* `groupName` : {string} : Specifies filter on group names, like 'Recent Photos' or custom album titles.
+* `assetType` : {string} : Specifies filter on asset type. Valid values are:
+ * `All`
+ * `Videos`
+ * `Photos` // default
+* `mimeTypes` : {Array} : Filter by mimetype (e.g. image/jpeg).
+
+Returns a Promise which when resolved will be of the following shape:
+
+* `edges` : {Array} An array of node objects
+ * `node`: {object} An object with the following shape:
+ * `type`: {string}
+ * `group_name`: {string}
+ * `image`: {object} : An object with the following shape:
+ * `uri`: {string}
+ * `height`: {number}
+ * `width`: {number}
+ * `isStored`: {boolean}
+ * `playableDuration`: {number}
+ * `timestamp`: {number}
+ * `location`: {object} : An object with the following shape:
+ * `latitude`: {number}
+ * `longitude`: {number}
+ * `altitude`: {number}
+ * `heading`: {number}
+ * `speed`: {number}
+* `page_info` : {object} : An object with the following shape:
+ * `has_next_page`: {boolean}
+ * `start_cursor`: {string}
+ * `end_cursor`: {string}
+
+#### Example
+
+Loading images:
+
+```javascript
+_handleButtonPress = () => {
+ CameraRoll.getPhotos({
+ first: 20,
+ assetType: 'Photos',
+ })
+ .then(r => {
+ this.setState({ photos: r.edges });
+ })
+ .catch((err) => {
+ //Error Loading Images
+ });
+ };
+render() {
+ return (
+
+
+
+ {this.state.photos.map((p, i) => {
+ return (
+
+ );
+ })}
+
+
+ );
+}
+```
diff --git a/docs/checkbox.md b/docs/checkbox.md
new file mode 100644
index 0000000..13a3b4c
--- /dev/null
+++ b/docs/checkbox.md
@@ -0,0 +1,74 @@
+---
+id: checkbox
+title: CheckBox
+---
+
+Renders a boolean input (Android only).
+
+This is a controlled component that requires an `onValueChange` callback that updates the `value` prop in order for the component to reflect user actions. If the `value` prop is not updated, the component will continue to render the supplied `value` prop instead of the expected result of any user actions.
+
+@keyword checkbox @keyword toggle
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`disabled`](checkbox.md#disabled)
+- [`onChange`](checkbox.md#onchange)
+- [`onValueChange`](checkbox.md#onvaluechange)
+- [`testID`](checkbox.md#testid)
+- [`value`](checkbox.md#value)
+
+---
+
+# Reference
+
+## Props
+
+### `disabled`
+
+If true the user won't be able to toggle the checkbox. Default value is false.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `onChange`
+
+Used in case the props change removes the component.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onValueChange`
+
+Invoked with the new value when the value changes.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `value`
+
+The value of the checkbox. If true the checkbox will be turned on. Default value is false.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
diff --git a/docs/clipboard.md b/docs/clipboard.md
new file mode 100644
index 0000000..60626ad
--- /dev/null
+++ b/docs/clipboard.md
@@ -0,0 +1,49 @@
+---
+id: clipboard
+title: Clipboard
+---
+
+`Clipboard` gives you an interface for setting and getting content from Clipboard on both iOS and Android
+
+### Methods
+
+* [`getString`](clipboard.md#getstring)
+* [`setString`](clipboard.md#setstring)
+
+---
+
+# Reference
+
+## Methods
+
+### `getString()`
+
+```javascript
+static getString()
+```
+
+Get content of string type, this method returns a `Promise`, so you can use following code to get clipboard content
+
+```javascript
+async _getContent() {
+ var content = await Clipboard.getString();
+}
+```
+
+---
+
+### `setString()`
+
+```javascript
+static setString(content)
+```
+
+Set content of string type. You can use following code to set clipboard content
+
+```javascript
+_setContent() {
+ Clipboard.setString('hello world');
+}
+```
+
+@param the content to be stored in the clipboard.
diff --git a/docs/colors.md b/docs/colors.md
new file mode 100644
index 0000000..814914e
--- /dev/null
+++ b/docs/colors.md
@@ -0,0 +1,182 @@
+---
+id: colors
+title: Color Reference
+---
+
+Components in React Native are [styled using JavaScript](style.md). Color properties usually match how [CSS works on the web](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
+
+### Red-green-blue
+
+React Native supports `rgb()` and `rgba()` in both hexadecimal and functional notation:
+
+* `'#f0f'` (#rgb)
+* `'#ff00ff'` (#rrggbb)
+
+* `'rgb(255, 0, 255)'`
+* `'rgba(255, 255, 255, 1.0)'`
+
+* `'#f0ff'` (#rgba)
+* `'#ff00ff00'` (#rrggbbaa)
+
+### Hue-saturation-lightness
+
+`hsl()` and `hsla()` is supported in functional notation:
+
+* `'hsl(360, 100%, 100%)'`
+* `'hsla(360, 100%, 100%, 1.0)'`
+
+### `transparent`
+
+This is a shortcut for `rgba(0,0,0,0)`:
+
+* `'transparent'`
+
+### Named colors
+
+You can also use color names as values. React Native follows the [CSS3 specification](http://www.w3.org/TR/css3-color/#svg-color):
+
+* aliceblue (#f0f8ff)
+* antiquewhite (#faebd7)
+* aqua (#00ffff)
+* aquamarine (#7fffd4)
+* azure (#f0ffff)
+* beige (#f5f5dc)
+* bisque (#ffe4c4)
+* black (#000000)
+* blanchedalmond (#ffebcd)
+* blue (#0000ff)
+* blueviolet (#8a2be2)
+* brown (#a52a2a)
+* burlywood (#deb887)
+* cadetblue (#5f9ea0)
+* chartreuse (#7fff00)
+* chocolate (#d2691e)
+* coral (#ff7f50)
+* cornflowerblue (#6495ed)
+* cornsilk (#fff8dc)
+* crimson (#dc143c)
+* cyan (#00ffff)
+* darkblue (#00008b)
+* darkcyan (#008b8b)
+* darkgoldenrod (#b8860b)
+* darkgray (#a9a9a9)
+* darkgreen (#006400)
+* darkgrey (#a9a9a9)
+* darkkhaki (#bdb76b)
+* darkmagenta (#8b008b)
+* darkolivegreen (#556b2f)
+* darkorange (#ff8c00)
+* darkorchid (#9932cc)
+* darkred (#8b0000)
+* darksalmon (#e9967a)
+* darkseagreen (#8fbc8f)
+* darkslateblue (#483d8b)
+* darkslategrey (#2f4f4f)
+* darkturquoise (#00ced1)
+* darkviolet (#9400d3)
+* deeppink (#ff1493)
+* deepskyblue (#00bfff)
+* dimgray (#696969)
+* dimgrey (#696969)
+* dodgerblue (#1e90ff)
+* firebrick (#b22222)
+* floralwhite (#fffaf0)
+* forestgreen (#228b22)
+* fuchsia (#ff00ff)
+* gainsboro (#dcdcdc)
+* ghostwhite (#f8f8ff)
+* gold (#ffd700)
+* goldenrod (#daa520)
+* gray (#808080)
+* green (#008000)
+* greenyellow (#adff2f)
+* grey (#808080)
+* honeydew (#f0fff0)
+* hotpink (#ff69b4)
+* indianred (#cd5c5c)
+* indigo (#4b0082)
+* ivory (#fffff0)
+* khaki (#f0e68c)
+* lavender (#e6e6fa)
+* lavenderblush (#fff0f5)
+* lawngreen (#7cfc00)
+* lemonchiffon (#fffacd)
+* lightblue (#add8e6)
+* lightcoral (#f08080)
+* lightcyan (#e0ffff)
+* lightgoldenrodyellow (#fafad2)
+* lightgray (#d3d3d3)
+* lightgreen (#90ee90)
+* lightgrey (#d3d3d3)
+* lightpink (#ffb6c1)
+* lightsalmon (#ffa07a)
+* lightseagreen (#20b2aa)
+* lightskyblue (#87cefa)
+* lightslategrey (#778899)
+* lightsteelblue (#b0c4de)
+* lightyellow (#ffffe0)
+* lime (#00ff00)
+* limegreen (#32cd32)
+* linen (#faf0e6)
+* magenta (#ff00ff)
+* maroon (#800000)
+* mediumaquamarine (#66cdaa)
+* mediumblue (#0000cd)
+* mediumorchid (#ba55d3)
+* mediumpurple (#9370db)
+* mediumseagreen (#3cb371)
+* mediumslateblue (#7b68ee)
+* mediumspringgreen (#00fa9a)
+* mediumturquoise (#48d1cc)
+* mediumvioletred (#c71585)
+* midnightblue (#191970)
+* mintcream (#f5fffa)
+* mistyrose (#ffe4e1)
+* moccasin (#ffe4b5)
+* navajowhite (#ffdead)
+* navy (#000080)
+* oldlace (#fdf5e6)
+* olive (#808000)
+* olivedrab (#6b8e23)
+* orange (#ffa500)
+* orangered (#ff4500)
+* orchid (#da70d6)
+* palegoldenrod (#eee8aa)
+* palegreen (#98fb98)
+* paleturquoise (#afeeee)
+* palevioletred (#db7093)
+* papayawhip (#ffefd5)
+* peachpuff (#ffdab9)
+* peru (#cd853f)
+* pink (#ffc0cb)
+* plum (#dda0dd)
+* powderblue (#b0e0e6)
+* purple (#800080)
+* rebeccapurple (#663399)
+* red (#ff0000)
+* rosybrown (#bc8f8f)
+* royalblue (#4169e1)
+* saddlebrown (#8b4513)
+* salmon (#fa8072)
+* sandybrown (#f4a460)
+* seagreen (#2e8b57)
+* seashell (#fff5ee)
+* sienna (#a0522d)
+* silver (#c0c0c0)
+* skyblue (#87ceeb)
+* slateblue (#6a5acd)
+* slategray (#708090)
+* snow (#fffafa)
+* springgreen (#00ff7f)
+* steelblue (#4682b4)
+* tan (#d2b48c)
+* teal (#008080)
+* thistle (#d8bfd8)
+* tomato (#ff6347)
+* turquoise (#40e0d0)
+* violet (#ee82ee)
+* wheat (#f5deb3)
+* white (#ffffff)
+* whitesmoke (#f5f5f5)
+* yellow (#ffff00)
+* yellowgreen (#9acd32)
diff --git a/docs/communication-android.md b/docs/communication-android.md
new file mode 100644
index 0000000..e6df266
--- /dev/null
+++ b/docs/communication-android.md
@@ -0,0 +1,107 @@
+---
+id: communication-android
+title: Communication between native and React Native
+---
+
+In [Integrating with Existing Apps guide](integration-with-existing-apps.md) and [Native UI Components guide](native-components-android.md) we learn how to embed React Native in a native component and vice versa. When we mix native and React Native components, we'll eventually find a need to communicate between these two worlds. Some ways to achieve that have been already mentioned in other guides. This article summarizes available techniques.
+
+## Introduction
+
+React Native is inspired by React, so the basic idea of the information flow is similar. The flow in React is one-directional. We maintain a hierarchy of components, in which each component depends only on its parent and its own internal state. We do this with properties: data is passed from a parent to its children in a top-down manner. If an ancestor component relies on the state of its descendant, one should pass down a callback to be used by the descendant to update the ancestor.
+
+The same concept applies to React Native. As long as we are building our application purely within the framework, we can drive our app with properties and callbacks. But, when we mix React Native and native components, we need some special, cross-language mechanisms that would allow us to pass information between them.
+
+## Properties
+
+Properties are the simplest way of cross-component communication. So we need a way to pass properties both from native to React Native, and from React Native to native.
+
+### Passing properties from native to React Native
+
+You can pass properties down to the React Native app by providing a custom implementation of `ReactActivityDelegate` in your main activity. This implementation should override `getLaunchOptions` to return a `Bundle` with the desired properties.
+
+```java
+public class MainActivity extends ReactActivity {
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate() {
+ return new ReactActivityDelegate(this, getMainComponentName()) {
+ @Override
+ protected Bundle getLaunchOptions() {
+ Bundle initialProperties = new Bundle();
+ ArrayList imageList = new ArrayList(Arrays.asList(
+ "http://foo.com/bar1.png",
+ "http://foo.com/bar2.png"
+ ));
+ initialProperties.putStringArrayList("images", imageList);
+ return initialProperties;
+ }
+ };
+ }
+}
+```
+
+```javascript
+import React from 'react';
+import {AppRegistry, View, Image} from 'react-native';
+
+class ImageBrowserApp extends React.Component {
+ renderImage(imgURI) {
+ return ;
+ }
+ render() {
+ return {this.props.images.map(this.renderImage)};
+ }
+}
+
+AppRegistry.registerComponent('AwesomeProject', () => ImageBrowserApp);
+```
+
+`ReactRootView` provides a read-write property `appProperties`. After `appProperties` is set, the React Native app is re-rendered with new properties. The update is only performed when the new updated properties differ from the previous ones.
+
+```java
+Bundle updatedProps = mReactRootView.getAppProperties();
+ArrayList imageList = new ArrayList(Arrays.asList(
+ "http://foo.com/bar3.png",
+ "http://foo.com/bar4.png"
+));
+updatedProps.putStringArrayList("images", imageList);
+
+mReactRootView.setAppProperties(updatedProps);
+```
+
+It is fine to update properties anytime. However, updates have to be performed on the main thread. You use the getter on any thread.
+
+There is no way to update only a few properties at a time. We suggest that you build it into your own wrapper instead.
+
+> **_Note:_** Currently, JS functions `componentWillReceiveProps` and `componentWillUpdateProps` of the top level RN component will not be called after a prop update. However, you can access the new props in `componentWillMount` function.
+
+### Passing properties from React Native to native
+
+The problem exposing properties of native components is covered in detail in [this article](native-components-android.md#3-expose-view-property-setters-using-reactprop-or-reactpropgroup-annotation). In short, properties that are to be reflected in JavaScript needs to be exposed as setter method annotated with `@ReactProp`, then just use them in React Native as if the component was an ordinary React Native component.
+
+### Limits of properties
+
+The main drawback of cross-language properties is that they do not support callbacks, which would allow us to handle bottom-up data bindings. Imagine you have a small RN view that you want to be removed from the native parent view as a result of a JS action. There is no way to do that with props, as the information would need to go bottom-up.
+
+Although we have a flavor of cross-language callbacks ([described here](native-modules-android.md#callbacks)), these callbacks are not always the thing we need. The main problem is that they are not intended to be passed as properties. Rather, this mechanism allows us to trigger a native action from JS, and handle the result of that action in JS.
+
+## Other ways of cross-language interaction (events and native modules)
+
+As stated in the previous chapter, using properties comes with some limitations. Sometimes properties are not enough to drive the logic of our app and we need a solution that gives more flexibility. This chapter covers other communication techniques available in React Native. They can be used for internal communication (between JS and native layers in RN) as well as for external communication (between RN and the 'pure native' part of your app).
+
+React Native enables you to perform cross-language function calls. You can execute custom native code from JS and vice versa. Unfortunately, depending on the side we are working on, we achieve the same goal in different ways. For native - we use events mechanism to schedule an execution of a handler function in JS, while for React Native we directly call methods exported by native modules.
+
+### Calling React Native functions from native (events)
+
+Events are described in detail in [this article](native-components-android.md#events). Note that using events gives us no guarantees about execution time, as the event is handled on a separate thread.
+
+Events are powerful, because they allow us to change React Native components without needing a reference to them. However, there are some pitfalls that you can fall into while using them:
+
+* As events can be sent from anywhere, they can introduce spaghetti-style dependencies into your project.
+* Events share namespace, which means that you may encounter some name collisions. Collisions will not be detected statically, which makes them hard to debug.
+* If you use several instances of the same React Native component and you want to distinguish them from the perspective of your event, you'll likely need to introduce identifiers and pass them along with events (you can use the native view's `reactTag` as an identifier).
+
+### Calling native functions from React Native (native modules)
+
+Native modules are Java classes that are available in JS. Typically one instance of each module is created per JS bridge. They can export arbitrary functions and constants to React Native. They have been covered in detail in [this article](native-modules-android.md).
+
+> **_Warning_**: All native modules share the same namespace. Watch out for name collisions when creating new ones.
diff --git a/docs/communication-ios.md b/docs/communication-ios.md
new file mode 100644
index 0000000..64baa3c
--- /dev/null
+++ b/docs/communication-ios.md
@@ -0,0 +1,202 @@
+---
+id: communication-ios
+title: Communication between native and React Native
+---
+
+In [Integrating with Existing Apps guide](integration-with-existing-apps.md) and [Native UI Components guide](native-components-ios.md) we learn how to embed React Native in a native component and vice versa. When we mix native and React Native components, we'll eventually find a need to communicate between these two worlds. Some ways to achieve that have been already mentioned in other guides. This article summarizes available techniques.
+
+## Introduction
+
+React Native is inspired by React, so the basic idea of the information flow is similar. The flow in React is one-directional. We maintain a hierarchy of components, in which each component depends only on its parent and its own internal state. We do this with properties: data is passed from a parent to its children in a top-down manner. If an ancestor component relies on the state of its descendant, one should pass down a callback to be used by the descendant to update the ancestor.
+
+The same concept applies to React Native. As long as we are building our application purely within the framework, we can drive our app with properties and callbacks. But, when we mix React Native and native components, we need some special, cross-language mechanisms that would allow us to pass information between them.
+
+## Properties
+
+Properties are the simplest way of cross-component communication. So we need a way to pass properties both from native to React Native, and from React Native to native.
+
+### Passing properties from native to React Native
+
+In order to embed a React Native view in a native component, we use `RCTRootView`. `RCTRootView` is a `UIView` that holds a React Native app. It also provides an interface between native side and the hosted app.
+
+`RCTRootView` has an initializer that allows you to pass arbitrary properties down to the React Native app. The `initialProperties` parameter has to be an instance of `NSDictionary`. The dictionary is internally converted into a JSON object that the top-level JS component can reference.
+
+```objectivec
+NSArray *imageList = @[@"http://foo.com/bar1.png",
+ @"http://foo.com/bar2.png"];
+
+NSDictionary *props = @{@"images" : imageList};
+
+RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
+ moduleName:@"ImageBrowserApp"
+ initialProperties:props];
+```
+
+```javascript
+import React from 'react';
+import {AppRegistry, View, Image} from 'react-native';
+
+class ImageBrowserApp extends React.Component {
+ renderImage(imgURI) {
+ return ;
+ }
+ render() {
+ return {this.props.images.map(this.renderImage)};
+ }
+}
+
+AppRegistry.registerComponent('ImageBrowserApp', () => ImageBrowserApp);
+```
+
+`RCTRootView` also provides a read-write property `appProperties`. After `appProperties` is set, the React Native app is re-rendered with new properties. The update is only performed when the new updated properties differ from the previous ones.
+
+```objectivec
+NSArray *imageList = @[@"http://foo.com/bar3.png",
+ @"http://foo.com/bar4.png"];
+
+rootView.appProperties = @{@"images" : imageList};
+```
+
+It is fine to update properties anytime. However, updates have to be performed on the main thread. You use the getter on any thread.
+
+> **_Note:_** Currently, there is a known issue where setting appProperties during the bridge startup, the change can be lost. See https://github.com/facebook/react-native/issues/20115 for more information.
+
+There is no way to update only a few properties at a time. We suggest that you build it into your own wrapper instead.
+
+> **_Note:_** Currently, JS functions `componentWillReceiveProps` and `componentWillUpdateProps` of the top level RN component will not be called after a prop update. However, you can access the new props in `componentWillMount` function.
+
+### Passing properties from React Native to native
+
+The problem exposing properties of native components is covered in detail in [this article](native-components-ios.md#properties). In short, export properties with `RCT_CUSTOM_VIEW_PROPERTY` macro in your custom native component, then just use them in React Native as if the component was an ordinary React Native component.
+
+### Limits of properties
+
+The main drawback of cross-language properties is that they do not support callbacks, which would allow us to handle bottom-up data bindings. Imagine you have a small RN view that you want to be removed from the native parent view as a result of a JS action. There is no way to do that with props, as the information would need to go bottom-up.
+
+Although we have a flavor of cross-language callbacks ([described here](native-modules-ios.md#callbacks)), these callbacks are not always the thing we need. The main problem is that they are not intended to be passed as properties. Rather, this mechanism allows us to trigger a native action from JS, and handle the result of that action in JS.
+
+## Other ways of cross-language interaction (events and native modules)
+
+As stated in the previous chapter, using properties comes with some limitations. Sometimes properties are not enough to drive the logic of our app and we need a solution that gives more flexibility. This chapter covers other communication techniques available in React Native. They can be used for internal communication (between JS and native layers in RN) as well as for external communication (between RN and the 'pure native' part of your app).
+
+React Native enables you to perform cross-language function calls. You can execute custom native code from JS and vice versa. Unfortunately, depending on the side we are working on, we achieve the same goal in different ways. For native - we use events mechanism to schedule an execution of a handler function in JS, while for React Native we directly call methods exported by native modules.
+
+### Calling React Native functions from native (events)
+
+Events are described in detail in [this article](native-components-ios.md#events). Note that using events gives us no guarantees about execution time, as the event is handled on a separate thread.
+
+Events are powerful, because they allow us to change React Native components without needing a reference to them. However, there are some pitfalls that you can fall into while using them:
+
+* As events can be sent from anywhere, they can introduce spaghetti-style dependencies into your project.
+* Events share namespace, which means that you may encounter some name collisions. Collisions will not be detected statically, which makes them hard to debug.
+* If you use several instances of the same React Native component and you want to distinguish them from the perspective of your event, you'll likely need to introduce identifiers and pass them along with events (you can use the native view's `reactTag` as an identifier).
+
+The common pattern we use when embedding native in React Native is to make the native component's RCTViewManager a delegate for the views, sending events back to JavaScript via the bridge. This keeps related event calls in one place.
+
+### Calling native functions from React Native (native modules)
+
+Native modules are Objective-C classes that are available in JS. Typically one instance of each module is created per JS bridge. They can export arbitrary functions and constants to React Native. They have been covered in detail in [this article](native-modules-ios.md#content).
+
+The fact that native modules are singletons limits the mechanism in the context of embedding. Let's say we have a React Native component embedded in a native view and we want to update the native, parent view. Using the native module mechanism, we would export a function that not only takes expected arguments, but also an identifier of the parent native view. The identifier would be used to retrieve a reference to the parent view to update. That said, we would need to keep a mapping from identifiers to native views in the module.
+
+Although this solution is complex, it is used in `RCTUIManager`, which is an internal React Native class that manages all React Native views.
+
+Native modules can also be used to expose existing native libraries to JS. The [Geolocation library](https://github.com/facebook/react-native/tree/master/Libraries/Geolocation) is a living example of the idea.
+
+> **_Warning_**: All native modules share the same namespace. Watch out for name collisions when creating new ones.
+
+## Layout computation flow
+
+When integrating native and React Native, we also need a way to consolidate two different layout systems. This section covers common layout problems and provides a brief description of mechanisms to address them.
+
+### Layout of a native component embedded in React Native
+
+This case is covered in [this article](native-components-ios.md#styles). Basically, as all our native react views are subclasses of `UIView`, most style and size attributes will work like you would expect out of the box.
+
+### Layout of a React Native component embedded in native
+
+#### React Native content with fixed size
+
+The simplest scenario is when we have a React Native app with a fixed size, which is known to the native side. In particular, a full-screen React Native view falls into this case. If we want a smaller root view, we can explicitly set RCTRootView's frame.
+
+For instance, to make an RN app 200 (logical) pixels high, and the hosting view's width wide, we could do:
+
+```objectivec
+// SomeViewController.m
+
+- (void)viewDidLoad
+{
+ [...]
+ RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
+ moduleName:appName
+ initialProperties:props];
+ rootView.frame = CGRectMake(0, 0, self.view.width, 200);
+ [self.view addSubview:rootView];
+}
+```
+
+When we have a fixed size root view, we need to respect its bounds on the JS side. In other words, we need to ensure that the React Native content can be contained within the fixed-size root view. The easiest way to ensure this is to use flexbox layout. If you use absolute positioning, and React components are visible outside the root view's bounds, you'll get overlap with native views, causing some features to behave unexpectedly. For instance, 'TouchableHighlight' will not highlight your touches outside the root view's bounds.
+
+It's totally fine to update root view's size dynamically by re-setting its frame property. React Native will take care of the content's layout.
+
+#### React Native content with flexible size
+
+In some cases we'd like to render content of initially unknown size. Let's say the size will be defined dynamically in JS. We have two solutions to this problem.
+
+1. You can wrap your React Native view in a `ScrollView` component. This guarantees that your content will always be available and it won't overlap with native views.
+2. React Native allows you to determine, in JS, the size of the RN app and provide it to the owner of the hosting `RCTRootView`. The owner is then responsible for re-laying out the subviews and keeping the UI consistent. We achieve this with `RCTRootView`'s flexibility modes.
+
+`RCTRootView` supports 4 different size flexibility modes:
+
+```objectivec
+// RCTRootView.h
+
+typedef NS_ENUM(NSInteger, RCTRootViewSizeFlexibility) {
+ RCTRootViewSizeFlexibilityNone = 0,
+ RCTRootViewSizeFlexibilityWidth,
+ RCTRootViewSizeFlexibilityHeight,
+ RCTRootViewSizeFlexibilityWidthAndHeight,
+};
+```
+
+`RCTRootViewSizeFlexibilityNone` is the default value, which makes a root view's size fixed (but it still can be updated with `setFrame:`). The other three modes allow us to track React Native content's size updates. For instance, setting mode to `RCTRootViewSizeFlexibilityHeight` will cause React Native to measure the content's height and pass that information back to `RCTRootView`'s delegate. An arbitrary action can be performed within the delegate, including setting the root view's frame, so the content fits. The delegate is called only when the size of the content has changed.
+
+> **_Warning:_** Making a dimension flexible in both JS and native leads to undefined behavior. For example - don't make a top-level React component's width flexible (with `flexbox`) while you're using `RCTRootViewSizeFlexibilityWidth` on the hosting `RCTRootView`.
+
+Let's look at an example.
+
+```objectivec
+// FlexibleSizeExampleView.m
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+ [...]
+
+ _rootView = [[RCTRootView alloc] initWithBridge:bridge
+ moduleName:@"FlexibilityExampleApp"
+ initialProperties:@{}];
+
+ _rootView.delegate = self;
+ _rootView.sizeFlexibility = RCTRootViewSizeFlexibilityHeight;
+ _rootView.frame = CGRectMake(0, 0, self.frame.size.width, 0);
+}
+
+#pragma mark - RCTRootViewDelegate
+- (void)rootViewDidChangeIntrinsicSize:(RCTRootView *)rootView
+{
+ CGRect newFrame = rootView.frame;
+ newFrame.size = rootView.intrinsicContentSize;
+
+ rootView.frame = newFrame;
+}
+```
+
+In the example we have a `FlexibleSizeExampleView` view that holds a root view. We create the root view, initialize it and set the delegate. The delegate will handle size updates. Then, we set the root view's size flexibility to `RCTRootViewSizeFlexibilityHeight`, which means that `rootViewDidChangeIntrinsicSize:` method will be called every time the React Native content changes its height. Finally, we set the root view's width and position. Note that we set there height as well, but it has no effect as we made the height RN-dependent.
+
+You can checkout full source code of the example [here](https://github.com/facebook/react-native/blob/master/RNTester/RNTester/NativeExampleViews/FlexibleSizeExampleView.m).
+
+It's fine to change root view's size flexibility mode dynamically. Changing flexibility mode of a root view will schedule a layout recalculation and the delegate `rootViewDidChangeIntrinsicSize:` method will be called once the content size is known.
+
+> **_Note:_** React Native layout calculation is performed on a special thread, while native UI view updates are done on the main thread. This may cause temporary UI inconsistencies between native and React Native. This is a known problem and our team is working on synchronizing UI updates coming from different sources.
+
+> **_Note:_** React Native does not perform any layout calculations until the root view becomes a subview of some other views. If you want to hide React Native view until its dimensions are known, add the root view as a subview and make it initially hidden (use `UIView`'s `hidden` property). Then change its visibility in the delegate method.
diff --git a/docs/components-and-apis.md b/docs/components-and-apis.md
new file mode 100644
index 0000000..609f94f
--- /dev/null
+++ b/docs/components-and-apis.md
@@ -0,0 +1,229 @@
+---
+id: components-and-apis
+title: Components and APIs
+---
+
+React Native provides a number of built-in components. You will find a full list of components and APIs on the sidebar to the left. If you're not sure where to get started, take a look at the following categories:
+
+* [Basic Components](components-and-apis.md#basic-components)
+* [User Interface](components-and-apis.md#user-interface)
+* [List Views](components-and-apis.md#list-views)
+* [iOS-specific](components-and-apis.md#ios-components-and-apis)
+* [Android-specific](components-and-apis.md#android-components-and-apis)
+* [Others](components-and-apis.md#others)
+
+You're not limited to the components and APIs bundled with React Native. React Native is a community of thousands of developers. If you're looking for a library that does something specific, search the npm registry for packages mentioning [react-native](https://www.npmjs.com/search?q=react-native&page=1&ranking=optimal), or check out [Awesome React Native](http://www.awesome-react-native.com/) for a curated list.
+
+## Basic Components
+
+Most apps will end up using one of these basic components. You'll want to get yourself familiarized with all of these if you're new to React Native.
+
+
Provides an abstraction layer similar to CSS stylesheets.
+
+
+
+## User Interface
+
+Render common user interface controls on any platform using the following components. For platform specific components, keep reading.
+
+
+
+## List Views
+
+Unlike the more generic `ScrollView`, the following list view components only render elements that are currently showing on the screen. This makes them a great choice for displaying long lists of data.
+
+
Container that allows to flip left and right between child views.
+
+
+
+## Others
+
+These components may come in handy for certain applications. For an exhaustive list of components and APIs, check out the sidebar to the left.
+
+
A component that renders web content in a native view.
+
+
diff --git a/docs/contributing.md b/docs/contributing.md
new file mode 100644
index 0000000..3a7d33a
--- /dev/null
+++ b/docs/contributing.md
@@ -0,0 +1,169 @@
+---
+id: contributing
+title: How to Contribute
+---
+
+We want to make contributing to this project as easy and transparent as possible. Read on to learn more about our development process and how to propose bug fixes and improvements.
+
+## [Code of Conduct](https://code.fb.com/codeofconduct/)
+
+Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the [full text](https://code.fb.com/codeofconduct/) so that you can understand what actions will and will not be tolerated.
+
+## Our Development Process
+
+Most changes from engineers at Facebook will sync to [GitHub](https://github.com/facebook/react-native) through a bridge with Facebook's internal source control. Changes from the community are handled through GitHub pull requests. Once a change made on GitHub is approved, it will first be imported into Facebook's internal source control. The change will eventually sync back to GitHub as a single commit once it has passed Facebook's internal tests.
+
+## Branch Organization
+
+We will do our best to keep the [`master` branch](https://github.com/facebook/react-native/tree/master) in good shape, with tests passing at all times. Sometimes, commits from Facebook engineers may land on `master`, temporarily breaking tests. While we have a comprehensive suite of tests that every diff must go through before it syncs out to GitHub, there are still some differences in development environments that prevent us from catching every one of these failures. We will do our best to resolve these quickly.
+
+Each React Native version is built from a release branch named after the version (e.g. `0.NN-stable`). Each release branch is cut from the `master` branch and subjected to a 30 day soak period, during which contributors will closely monitor for any regressions. You can opt into these release candidates by installing `react-native@next` from npm. The release will eventually be promoted to stable, and published to npm as `react-native@latest`.
+
+To see what changes are coming and provide better feedback to React Native contributors, use the latest release candidate whenever possible. By the time a release candidate is released, the changes it contains will have been shipped in production Facebook apps for over two weeks.
+
+## Bugs
+
+### Where to Find Known Issues
+
+We are using [GitHub Issues](https://github.com/facebook/react-native/issues) for our public bugs.
+
+### Reporting a New Issue
+
+The best way to get your bug fixed is to provide a reduced test case. You can use a tool such as [Snack](https://snack.expo.io/) to provide a minimal example.
+
+### Security Bugs
+
+Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue.
+
+## How to Get in Touch
+
+We have a discussion forum for React and React Native: [discuss.reactjs.org](https://discuss.reactjs.org/)
+
+There is also [an active community of users on the Discord chat platform](http://www.reactiflux.com/) in case you need help with React or React Native.
+
+### Request for Comments (RFC)
+
+Many changes, including bug fixes and documentation improvements can be implemented and reviewed via the normal GitHub pull request workflow.
+
+Some changes though are “substantial”, and we ask that these be put through a bit of a design process and produce a consensus among the React Native core team.
+
+The "RFC" (request for comments) process is intended to provide a consistent and controlled path for new features to be proposed and championed to then enter the project.
+
+It is inspired by the [React RFCs repository](https://github.com/reactjs/rfcs), but today we don't expect for every substantial change to go through this process; however, we hope that this brings more awareness to the community.
+
+You can contribute by visiting the [discussions and proposals repository](https://github.com/react-native-community/discussions-and-proposals).
+
+### Get Involved
+
+There are many ways to contribute to React Native, and many of them do not involve writing any code. Here's a few ideas to get started:
+
+* Simply start using React Native. Go through the [Getting Started](getting-started.md) guide. Does everything work as expected? If not, we're always looking for improvements.
+* Look through the [open issues](https://github.com/facebook/react-native/issues). Provide workarounds, ask for clarification, or suggest labels. Active community members can get access to our issue management tools, unlocking the ability to label, close, or re-open issues.
+* If you find an issue you would like to fix, open a pull request. Issues tagged as [_Good first issue_](https://github.com/facebook/react-native/labels/Good%20first%20issue) are a good place to get started.
+* Read through the docs. If you find anything that is confusing or can be improved, you can make edits by clicking "Edit" at the top of most docs.
+* Browse [Stack Overflow](https://stackoverflow.com/questions/tagged/react-native) and answer questions. This will help you get familiarized with common pitfalls or misunderstandings, which can be useful when contributing updates to the documentation.
+* Before opening your pull request, make sure you have fully tested your changes. Test your changes locally and by running the various tests provided.
+* Check out the [Testing your changes guide](https://facebook.github.io/react-native/docs/testing.html) to find out about the numerous tests which has been provided to help ensure that any new changes wont cause a regression.
+
+Core contributors to React Native meet regularly and post their meeting notes [online](https://github.com/react-native-community/discussions-and-proposals/tree/master/core-meetings). You can also find ad hoc discussions at [https://discuss.reactjs.org/](https://discuss.reactjs.org/).
+
+## Pull requests
+
+### Your first pull request
+
+So you have decided to contribute code back to upstream by opening a pull request. You've invested a good chunk of time, and we appreciate it. We will do our best to work with you and get the PR looked at.
+
+If you are working on your first pull request, you can learn how from this free video series: [**How to Contribute to an Open Source Project on GitHub**](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
+
+### Proposing a change
+
+If you intend to change the API, or make any non-trivial changes to the implementation, we recommend [filing an issue](https://github.com/react-native-community/discussions-and-proposals/issues/new). This lets us reach an agreement on your proposal before you put significant effort into it.
+
+If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend to file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue.
+
+### Sending a pull request
+
+Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
+
+Please make sure the following is done when submitting a pull request:
+
+1. Fork [the repository](https://github.com/facebook/react-native) and create your branch from `master`.
+2. Add the copyright notice to the top of any new files you've added.
+3. Describe your **test plan** in your pull request description (e.g. how did you test this?)
+4. Make sure your code lints (`npm run lint` and `npm run prettier`).
+5. If you haven't already, complete the Contributor License Agreement ("CLA").
+
+### Contributor License Agreement ("CLA")
+
+In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Facebook's open source projects.
+
+[**Complete your CLA here.**](https://code.facebook.com/cla)
+
+### Changelog
+
+Provide a changelog entry to help reviewers during the release process. Changes that do not impact React Native developers may be ommitted from the changelog.
+
+A changelog entry has the following format:
+
+```
+[CATEGORY] [TYPE] - Message
+```
+
+* `CATEGORY` may be:
+
+ * [General]
+ * [iOS]
+ * [Android]
+
+* `TYPE` may be:
+
+ * [Added] for new features.
+ * [Changed] for changes in existing functionality.
+ * [Deprecated] for soon-to-be removed features.
+ * [Removed] for now removed features.
+ * [Fixed] for any bug fixes.
+ * [Security] in case of vulnerabilities.
+
+* `MESSAGE` may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.
+
+For more detail, see [How do I make a good changelog?](https://keepachangelog.com/en/1.0.0/#how)
+
+#### Changelog Examples
+
+* [General][added] - Add snapToOffsets prop to ScrollView component
+* [General][fixed] - Fix various issues in snapToInterval on ScrollView component
+* [iOS][fixed] - Fix crash in RCTImagePicker
+
+### Test plan
+
+A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website.
+
+* If you've added code that should be tested, add tests!
+* If you've changed APIs, update the documentation via an additional PR to the [react-native-website](https://github.com/facebook/react-native-website) repo.
+* If you've updated the docs, verify the website locally and submit screenshots if applicable (see the [react-native-website](https://github.com/facebook/react-native-website) README).
+
+See [What is a Test Plan?](https://medium.com/@martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9) to learn more.
+
+### Coding Style
+
+We use Prettier to format our JavaScript code. This saves you time and energy as you can let Prettier fix up any formatting issues automatically through its editor integrations, or by manually running `npm run prettier`. We also use a linter to catch styling issues that may exist in your code. You can check the status of your code styling by simply running `npm run lint`.
+
+However, there are still some styles that the linter cannot pick up, notably in Java or Objective-C code.
+
+**Objective-C:**
+
+* Space after `@property` declarations
+* Brackets on _every_ `if`, on the _same_ line
+* `- method`, `@interface`, and `@implementation` brackets on the following line
+* _Try_ to keep it around 80 characters line length (sometimes it's just not possible...)
+* `*` operator goes with the variable name (e.g. `NSObject *variableName;`)
+
+**Java:**
+
+* If a method call spans multiple lines closing bracket is on the same line as the last argument.
+* If a method header doesn't fit on one line each argument goes on a separate line.
+* 100 character line length
+
+## License
+
+By contributing to React Native, you agree that your contributions will be licensed under the [LICENSE](https://github.com/facebook/react-native/blob/master/LICENSE) file.
diff --git a/docs/custom-webview-android.md b/docs/custom-webview-android.md
new file mode 100644
index 0000000..1523224
--- /dev/null
+++ b/docs/custom-webview-android.md
@@ -0,0 +1,258 @@
+---
+id: custom-webview-android
+title: Custom WebView
+---
+
+While the built-in web view has a lot of features, it is not possible to handle every use-case in React Native. You can, however, extend the web view with native code without forking React Native or duplicating all the existing web view code.
+
+Before you do this, you should be familiar with the concepts in [native UI components](native-components-android). You should also familiarise yourself with the [native code for web views](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java), as you will have to use this as a reference when implementing new features—although a deep understanding is not required.
+
+## Native Code
+
+To get started, you'll need to create a subclass of `ReactWebViewManager`, `ReactWebView`, and `ReactWebViewClient`. In your view manager, you'll then need to override:
+
+* `createReactWebViewInstance`
+* `getName`
+* `addEventEmitters`
+
+```java
+@ReactModule(name = CustomWebViewManager.REACT_CLASS)
+public class CustomWebViewManager extends ReactWebViewManager {
+ /* This name must match what we're referring to in JS */
+ protected static final String REACT_CLASS = "RCTCustomWebView";
+
+ protected static class CustomWebViewClient extends ReactWebViewClient { }
+
+ protected static class CustomWebView extends ReactWebView {
+ public CustomWebView(ThemedReactContext reactContext) {
+ super(reactContext);
+ }
+ }
+
+ @Override
+ protected ReactWebView createReactWebViewInstance(ThemedReactContext reactContext) {
+ return new CustomWebView(reactContext);
+ }
+
+ @Override
+ public String getName() {
+ return REACT_CLASS;
+ }
+
+ @Override
+ protected void addEventEmitters(ThemedReactContext reactContext, WebView view) {
+ view.setWebViewClient(new CustomWebViewClient());
+ }
+}
+```
+
+You'll need to follow the usual steps to [register the module](native-modules-android.md#register-the-module).
+
+### Adding New Properties
+
+To add a new property, you'll need to add it to `CustomWebView`, and then expose it in `CustomWebViewManager`.
+
+```java
+public class CustomWebViewManager extends ReactWebViewManager {
+ ...
+
+ protected static class CustomWebView extends ReactWebView {
+ public CustomWebView(ThemedReactContext reactContext) {
+ super(reactContext);
+ }
+
+ protected @Nullable String mFinalUrl;
+
+ public void setFinalUrl(String url) {
+ mFinalUrl = url;
+ }
+
+ public String getFinalUrl() {
+ return mFinalUrl;
+ }
+ }
+
+ ...
+
+ @ReactProp(name = "finalUrl")
+ public void setFinalUrl(WebView view, String url) {
+ ((CustomWebView) view).setFinalUrl(url);
+ }
+}
+```
+
+### Adding New Events
+
+For events, you'll first need to make create event subclass.
+
+```java
+// NavigationCompletedEvent.java
+public class NavigationCompletedEvent extends Event {
+ private WritableMap mParams;
+
+ public NavigationCompletedEvent(int viewTag, WritableMap params) {
+ super(viewTag);
+ this.mParams = params;
+ }
+
+ @Override
+ public String getEventName() {
+ return "navigationCompleted";
+ }
+
+ @Override
+ public void dispatch(RCTEventEmitter rctEventEmitter) {
+ init(getViewTag());
+ rctEventEmitter.receiveEvent(getViewTag(), getEventName(), mParams);
+ }
+}
+```
+
+You can trigger the event in your web view client. You can hook existing handlers if your events are based on them.
+
+You should refer to [ReactWebViewManager.java](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java) in the React Native codebase to see what handlers are available and how they are implemented. You can extend any methods here to provide extra functionality.
+
+```java
+public class NavigationCompletedEvent extends Event {
+ private WritableMap mParams;
+
+ public NavigationCompletedEvent(int viewTag, WritableMap params) {
+ super(viewTag);
+ this.mParams = params;
+ }
+
+ @Override
+ public String getEventName() {
+ return "navigationCompleted";
+ }
+
+ @Override
+ public void dispatch(RCTEventEmitter rctEventEmitter) {
+ init(getViewTag());
+ rctEventEmitter.receiveEvent(getViewTag(), getEventName(), mParams);
+ }
+}
+
+// CustomWebViewManager.java
+protected static class CustomWebViewClient extends ReactWebViewClient {
+ @Override
+ public boolean shouldOverrideUrlLoading(WebView view, String url) {
+ boolean shouldOverride = super.shouldOverrideUrlLoading(view, url);
+ String finalUrl = ((CustomWebView) view).getFinalUrl();
+
+ if (!shouldOverride && url != null && finalUrl != null && new String(url).equals(finalUrl)) {
+ final WritableMap params = Arguments.createMap();
+ dispatchEvent(view, new NavigationCompletedEvent(view.getId(), params));
+ }
+
+ return shouldOverride;
+ }
+}
+```
+
+Finally, you'll need to expose the events in `CustomWebViewManager` through `getExportedCustomDirectEventTypeConstants`. Note that currently, the default implementation returns `null`, but this may change in the future.
+
+```java
+public class CustomWebViewManager extends ReactWebViewManager {
+ ...
+
+ @Override
+ public @Nullable
+ Map getExportedCustomDirectEventTypeConstants() {
+ Map export = super.getExportedCustomDirectEventTypeConstants();
+ if (export == null) {
+ export = MapBuilder.newHashMap();
+ }
+ export.put("navigationCompleted", MapBuilder.of("registrationName", "onNavigationCompleted"));
+ return export;
+ }
+}
+```
+
+## JavaScript Interface
+
+To use your custom web view, you'll need to create a class for it. Your class must:
+
+* Export all the prop types from `WebView.propTypes`
+* Return a `WebView` component with the prop `nativeConfig.component` set to your native component (see below)
+
+To get your native component, you must use `requireNativeComponent`: the same as for regular custom components. However, you must pass in an extra third argument, `WebView.extraNativeComponentConfig`. This third argument contains prop types that are only required for native code.
+
+```javascript
+import React, {Component, PropTypes} from 'react';
+import {WebView, requireNativeComponent} from 'react-native';
+
+export default class CustomWebView extends Component {
+ static propTypes = WebView.propTypes;
+
+ render() {
+ return (
+
+ );
+ }
+}
+
+const RCTCustomWebView = requireNativeComponent(
+ 'RCTCustomWebView',
+ CustomWebView,
+ WebView.extraNativeComponentConfig,
+);
+```
+
+If you want to add custom props to your native component, you can use `nativeConfig.props` on the web view.
+
+For events, the event handler must always be set to a function. This means it isn't safe to use the event handler directly from `this.props`, as the user might not have provided one. The standard approach is to create a event handler in your class, and then invoking the event handler given in `this.props` if it exists.
+
+If you are unsure how something should be implemented from the JS side, look at [WebView.android.js](https://github.com/facebook/react-native/blob/master/Libraries/Components/WebView/WebView.android.js) in the React Native source.
+
+```javascript
+export default class CustomWebView extends Component {
+ static propTypes = {
+ ...WebView.propTypes,
+ finalUrl: PropTypes.string,
+ onNavigationCompleted: PropTypes.func,
+ };
+
+ static defaultProps = {
+ finalUrl: 'about:blank',
+ };
+
+ _onNavigationCompleted = (event) => {
+ const {onNavigationCompleted} = this.props;
+ onNavigationCompleted && onNavigationCompleted(event);
+ };
+
+ render() {
+ return (
+
+ );
+ }
+}
+```
+
+Just like for regular native components, you must provide all your prop types in the component to have them forwarded on to the native component. However, if you have some prop types that are only used internally in component, you can add them to the `nativeOnly` property of the third argument previously mentioned. For event handlers, you have to use the value `true` instead of a regular prop type.
+
+For example, if you wanted to add an internal event handler called `onScrollToBottom`, you would use,
+
+```javascript
+const RCTCustomWebView = requireNativeComponent(
+ 'RCTCustomWebView',
+ CustomWebView,
+ {
+ ...WebView.extraNativeComponentConfig,
+ nativeOnly: {
+ ...WebView.extraNativeComponentConfig.nativeOnly,
+ onScrollToBottom: true,
+ },
+ },
+);
+```
diff --git a/docs/custom-webview-ios.md b/docs/custom-webview-ios.md
new file mode 100644
index 0000000..4a4a8df
--- /dev/null
+++ b/docs/custom-webview-ios.md
@@ -0,0 +1,232 @@
+---
+id: custom-webview-ios
+title: Custom WebView
+---
+
+While the built-in web view has a lot of features, it is not possible to handle every use-case in React Native. You can, however, extend the web view with native code without forking React Native or duplicating all the existing web view code.
+
+Before you do this, you should be familiar with the concepts in [native UI components](native-components-ios). You should also familiarise yourself with the [native code for web views](https://github.com/facebook/react-native/blob/master/React/Views/RCTWebViewManager.m), as you will have to use this as a reference when implementing new features—although a deep understanding is not required.
+
+## Native Code
+
+Like for regular native components, you need a view manager and an web view.
+
+For the view, you'll need to make a subclass of `RCTWebView`.
+
+```objc
+// RCTCustomWebView.h
+#import
+
+@interface RCTCustomWebView : RCTWebView
+
+@end
+
+// RCTCustomWebView.m
+#import "RCTCustomWebView.h"
+
+@interface RCTCustomWebView ()
+
+@end
+
+@implementation RCTCustomWebView { }
+
+@end
+```
+
+For the view manager, you need to make a subclass `RCTWebViewManager`. You must still include:
+
+* `(UIView *)view` that returns your custom view
+* The `RCT_EXPORT_MODULE()` tag
+
+```objc
+// RCTCustomWebViewManager.h
+#import
+
+@interface RCTCustomWebViewManager : RCTWebViewManager
+
+@end
+
+// RCTCustomWebViewManager.m
+#import "RCTCustomWebViewManager.h"
+#import "RCTCustomWebView.h"
+
+@interface RCTCustomWebViewManager ()
+
+@end
+
+@implementation RCTCustomWebViewManager { }
+
+RCT_EXPORT_MODULE()
+
+- (UIView *)view
+{
+ RCTCustomWebView *webView = [RCTCustomWebView new];
+ webView.delegate = self;
+ return webView;
+}
+
+@end
+```
+
+### Adding New Events and Properties
+
+Adding new properties and events is the same as regular UI components. For properties, you define an `@property` in the header. For events, you define a `RCTDirectEventBlock` in the view's `@interface`.
+
+```objc
+// RCTCustomWebView.h
+@property (nonatomic, copy) NSString *finalUrl;
+
+// RCTCustomWebView.m
+@interface RCTCustomWebView ()
+
+@property (nonatomic, copy) RCTDirectEventBlock onNavigationCompleted;
+
+@end
+```
+
+Then expose it in the view manager's `@implementation`.
+
+```objc
+// RCTCustomWebViewManager.m
+RCT_EXPORT_VIEW_PROPERTY(onNavigationCompleted, RCTDirectEventBlock)
+RCT_EXPORT_VIEW_PROPERTY(finalUrl, NSString)
+```
+
+### Extending Existing Events
+
+You should refer to [RCTWebView.m](https://github.com/facebook/react-native/blob/master/React/Views/RCTWebView.m) in the React Native codebase to see what handlers are available and how they are implemented. You can extend any methods here to provide extra functionality.
+
+By default, most methods aren't exposed from RCTWebView. If you need to expose them, you need to create an [Objective C category](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html), and then expose all the methods you need to use.
+
+```objc
+// RCTWebView+Custom.h
+#import
+
+@interface RCTWebView (Custom)
+- (BOOL)webView:(__unused UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;
+- (NSMutableDictionary *)baseEvent;
+@end
+```
+
+Once these are exposed, you can reference them in your custom web view class.
+
+```objc
+// RCTCustomWebView.m
+
+// Remember to import the category file.
+#import "RCTWebView+Custom.h"
+
+- (BOOL)webView:(__unused UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request
+ navigationType:(UIWebViewNavigationType)navigationType
+{
+ BOOL allowed = [super webView:webView shouldStartLoadWithRequest:request navigationType:navigationType];
+
+ if (allowed) {
+ NSString* url = request.URL.absoluteString;
+ if (url && [url isEqualToString:_finalUrl]) {
+ if (_onNavigationCompleted) {
+ NSMutableDictionary *event = [self baseEvent];
+ _onNavigationCompleted(event);
+ }
+ }
+ }
+
+ return allowed;
+}
+```
+
+## JavaScript Interface
+
+To use your custom web view, you'll need to create a class for it. Your class must:
+
+* Export all the prop types from `WebView.propTypes`
+* Return a `WebView` component with the prop `nativeConfig.component` set to your native component (see below)
+
+To get your native component, you must use `requireNativeComponent`: the same as for regular custom components. However, you must pass in an extra third argument, `WebView.extraNativeComponentConfig`. This third argument contains prop types that are only required for native code.
+
+```javascript
+import React, {Component, PropTypes} from 'react';
+import {WebView, requireNativeComponent, NativeModules} from 'react-native';
+const {CustomWebViewManager} = NativeModules;
+
+export default class CustomWebView extends Component {
+ static propTypes = WebView.propTypes;
+
+ render() {
+ return (
+
+ );
+ }
+}
+
+const RCTCustomWebView = requireNativeComponent(
+ 'RCTCustomWebView',
+ CustomWebView,
+ WebView.extraNativeComponentConfig,
+);
+```
+
+If you want to add custom props to your native component, you can use `nativeConfig.props` on the web view. For iOS, you should also set the `nativeConfig.viewManager` prop with your custom WebView ViewManager as in the example above.
+
+For events, the event handler must always be set to a function. This means it isn't safe to use the event handler directly from `this.props`, as the user might not have provided one. The standard approach is to create a event handler in your class, and then invoking the event handler given in `this.props` if it exists.
+
+If you are unsure how something should be implemented from the JS side, look at [WebView.ios.js](https://github.com/facebook/react-native/blob/master/Libraries/Components/WebView/WebView.ios.js) in the React Native source.
+
+```javascript
+export default class CustomWebView extends Component {
+ static propTypes = {
+ ...WebView.propTypes,
+ finalUrl: PropTypes.string,
+ onNavigationCompleted: PropTypes.func,
+ };
+
+ static defaultProps = {
+ finalUrl: 'about:blank',
+ };
+
+ _onNavigationCompleted = (event) => {
+ const {onNavigationCompleted} = this.props;
+ onNavigationCompleted && onNavigationCompleted(event);
+ };
+
+ render() {
+ return (
+
+ );
+ }
+}
+```
+
+Just like for regular native components, you must provide all your prop types in the component to have them forwarded on to the native component. However, if you have some prop types that are only used internally in component, you can add them to the `nativeOnly` property of the third argument previously mentioned. For event handlers, you have to use the value `true` instead of a regular prop type.
+
+For example, if you wanted to add an internal event handler called `onScrollToBottom`, you would use,
+
+```javascript
+const RCTCustomWebView = requireNativeComponent(
+ 'RCTCustomWebView',
+ CustomWebView,
+ {
+ ...WebView.extraNativeComponentConfig,
+ nativeOnly: {
+ ...WebView.extraNativeComponentConfig.nativeOnly,
+ onScrollToBottom: true,
+ },
+ },
+);
+```
diff --git a/docs/datepickerandroid.md b/docs/datepickerandroid.md
new file mode 100644
index 0000000..b140c7f
--- /dev/null
+++ b/docs/datepickerandroid.md
@@ -0,0 +1,77 @@
+---
+id: datepickerandroid
+title: DatePickerAndroid
+---
+
+Opens the standard Android date picker dialog.
+
+### Example
+
+```javascript
+try {
+ const {action, year, month, day} = await DatePickerAndroid.open({
+ // Use `new Date()` for current date.
+ // May 25 2020. Month 0 is January.
+ date: new Date(2020, 4, 25)
+ });
+ if (action !== DatePickerAndroid.dismissedAction) {
+ // Selected year, month (0-11), day
+ }
+} catch ({code, message}) {
+ console.warn('Cannot open date picker', message);
+}
+```
+
+### Methods
+
+* [`open`](datepickerandroid.md#open)
+* [`dateSetAction`](datepickerandroid.md#datesetaction)
+* [`dismissedAction`](datepickerandroid.md#dismissedaction)
+
+---
+
+# Reference
+
+## Methods
+
+### `open()`
+
+```javascript
+static open(options)
+```
+
+Opens the standard Android date picker dialog.
+
+The available keys for the `options` object are:
+
+* `date` (`Date` object or timestamp in milliseconds) - date to show by default
+* `minDate` (`Date` or timestamp in milliseconds) - minimum date that can be selected
+* `maxDate` (`Date` object or timestamp in milliseconds) - maximum date that can be selected
+* `mode` (`enum('calendar', 'spinner', 'default')`) - To set the date-picker mode to calendar/spinner/default
+ * 'calendar': Show a date picker in calendar mode.
+ * 'spinner': Show a date picker in spinner mode.
+ * 'default': Show a default native date picker(spinner/calendar) based on android versions.
+
+Returns a Promise which will be invoked an object containing `action`, `year`, `month` (0-11), `day` if the user picked a date. If the user dismissed the dialog, the Promise will still be resolved with action being `DatePickerAndroid.dismissedAction` and all the other keys being undefined. **Always** check whether the `action` is equal to `DatePickerAndroid.dateSetAction` before reading the values.
+
+Note the native date picker dialog has some UI glitches on Android 4 and lower when using the `minDate` and `maxDate` options.
+
+---
+
+### `dateSetAction()`
+
+```javascript
+static dateSetAction()
+```
+
+A date has been selected.
+
+---
+
+### `dismissedAction()`
+
+```javascript
+static dismissedAction()
+```
+
+The dialog has been dismissed.
diff --git a/docs/datepickerios.md b/docs/datepickerios.md
new file mode 100644
index 0000000..192d202
--- /dev/null
+++ b/docs/datepickerios.md
@@ -0,0 +1,163 @@
+---
+id: datepickerios
+title: DatePickerIOS
+---
+
+Use `DatePickerIOS` to render a date/time picker (selector) on iOS. This is a controlled component, so you must hook in to the `onDateChange` callback and update the `date` prop in order for the component to update, otherwise the user's change will be reverted immediately to reflect `props.date` as the source of truth.
+
+### Example
+
+```javascript
+import React, {Component} from 'react';
+import {DatePickerIOS, View, StyleSheet} from 'react-native';
+
+export default class App extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {chosenDate: new Date()};
+
+ this.setDate = this.setDate.bind(this);
+ }
+
+ setDate(newDate) {
+ this.setState({chosenDate: newDate});
+ }
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+});
+```
+
+
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`date`](datepickerios.md#date)
+- [`onDateChange`](datepickerios.md#ondatechange)
+- [`maximumDate`](datepickerios.md#maximumdate)
+- [`minimumDate`](datepickerios.md#minimumdate)
+- [`minuteInterval`](datepickerios.md#minuteinterval)
+- [`mode`](datepickerios.md#mode)
+- [`locale`](datepickerios.md#locale)
+- [`timeZoneOffsetInMinutes`](datepickerios.md#timezoneoffsetinminutes)
+
+---
+
+# Reference
+
+## Props
+
+### `date`
+
+The currently selected date.
+
+| Type | Required |
+| ---- | -------- |
+| Date | Yes |
+
+---
+
+### `onDateChange`
+
+Date change handler.
+
+This is called when the user changes the date or time in the UI. The first and only argument is a Date object representing the new date and time.
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+---
+
+### `maximumDate`
+
+Maximum date.
+
+Restricts the range of possible date/time values.
+
+| Type | Required |
+| ---- | -------- |
+| Date | No |
+
+Example with `maximumDate` set to December 31, 2017:
+
+
+
+---
+
+### `minimumDate`
+
+Minimum date.
+
+Restricts the range of possible date/time values.
+
+| Type | Required |
+| ---- | -------- |
+| Date | No |
+
+See [`maximumDate`](datepickerios.md#maximumdate) for an example image.
+
+---
+
+### `minuteInterval`
+
+The interval at which minutes can be selected.
+
+| Type | Required |
+| ------------------------------------------ | -------- |
+| enum(1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30) | No |
+
+Example with `minuteInterval` set to `10`:
+
+
+
+---
+
+### `mode`
+
+The date picker mode.
+
+| Type | Required |
+| -------------------------------- | -------- |
+| enum('date', 'time', 'datetime') | No |
+
+Example with `mode` set to `date`, `time`, and `datetime`: 
+
+---
+
+### `locale`
+
+The locale for the date picker. Value needs to be a [Locale ID](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html).
+
+| Type | Required |
+| ------ | -------- |
+| String | No |
+
+---
+
+### `timeZoneOffsetInMinutes`
+
+Timezone offset in minutes.
+
+By default, the date picker will use the device's timezone. With this parameter, it is possible to force a certain timezone offset. For instance, to show times in Pacific Standard Time, pass -7 \* 60.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
diff --git a/docs/dimensions.md b/docs/dimensions.md
new file mode 100644
index 0000000..997fe06
--- /dev/null
+++ b/docs/dimensions.md
@@ -0,0 +1,67 @@
+---
+id: dimensions
+title: Dimensions
+---
+
+### Methods
+
+* [`set`](dimensions.md#set)
+* [`get`](dimensions.md#get)
+* [`addEventListener`](dimensions.md#addeventlistener)
+* [`removeEventListener`](dimensions.md#removeeventlistener)
+
+---
+
+# Reference
+
+## Methods
+
+### `set()`
+
+```javascript
+static set(dims)
+```
+
+This should only be called from native code by sending the didUpdateDimensions event.
+
+@param {object} dims Simple string-keyed object of dimensions to set
+
+---
+
+### `get()`
+
+```javascript
+static get(dim)
+```
+
+Initial dimensions are set before `runApplication` is called so they should be available before any other require's are run, but may be updated later.
+
+> Note: Although dimensions are available immediately, they may change (e.g due to device rotation) so any rendering logic or styles that depend on these constants should try to call this function on every render, rather than caching the value (for example, using inline styles rather than setting a value in a `StyleSheet`).
+
+Example: `var {height, width} = Dimensions.get('window');`
+
+@param {string} dim Name of dimension as defined when calling `set`. @returns {Object?} Value for the dimension.
+
+> For Android the `window` dimension will exclude the size used by the `status bar` (if not translucent) and `bottom navigation bar`
+
+---
+
+### `addEventListener()`
+
+```javascript
+static addEventListener(type, handler)
+```
+
+Add an event handler. Supported events:
+
+* `change`: Fires when a property within the `Dimensions` object changes. The argument to the event handler is an object with `window` and `screen` properties whose values are the same as the return values of `Dimensions.get('window')` and `Dimensions.get('screen')`, respectively.
+
+---
+
+### `removeEventListener()`
+
+```javascript
+static removeEventListener(type, handler)
+```
+
+Remove an event handler.
diff --git a/docs/direct-manipulation.md b/docs/direct-manipulation.md
new file mode 100644
index 0000000..744d4cf
--- /dev/null
+++ b/docs/direct-manipulation.md
@@ -0,0 +1,206 @@
+---
+id: direct-manipulation
+title: Direct Manipulation
+---
+
+It is sometimes necessary to make changes directly to a component without using state/props to trigger a re-render of the entire subtree. When using React in the browser for example, you sometimes need to directly modify a DOM node, and the same is true for views in mobile apps. `setNativeProps` is the React Native equivalent to setting properties directly on a DOM node.
+
+> Use setNativeProps when frequent re-rendering creates a performance bottleneck
+>
+> Direct manipulation will not be a tool that you reach for frequently; you will typically only be using it for creating continuous animations to avoid the overhead of rendering the component hierarchy and reconciling many views. `setNativeProps` is imperative and stores state in the native layer (DOM, UIView, etc.) and not within your React components, which makes your code more difficult to reason about. Before you use it, try to solve your problem with `setState` and [shouldComponentUpdate](http://facebook.github.io/react/advanced-performance.md#shouldcomponentupdate-in-action).
+
+## setNativeProps with TouchableOpacity
+
+[TouchableOpacity](https://github.com/facebook/react-native/blob/master/Libraries/Components/Touchable/TouchableOpacity.js) uses `setNativeProps` internally to update the opacity of its child component:
+
+```javascript
+setOpacityTo(value) {
+ // Redacted: animation related code
+ this.refs[CHILD_REF].setNativeProps({
+ opacity: value
+ });
+},
+```
+
+This allows us to write the following code and know that the child will have its opacity updated in response to taps, without the child having any knowledge of that fact or requiring any changes to its implementation:
+
+```javascript
+
+
+ Press me!
+
+
+```
+
+Let's imagine that `setNativeProps` was not available. One way that we might implement it with that constraint is to store the opacity value in the state, then update that value whenever `onPress` is fired:
+
+```javascript
+constructor(props) {
+ super(props);
+ this.state = { myButtonOpacity: 1, };
+}
+
+render() {
+ return (
+ this.setState({myButtonOpacity: 0.5})}
+ onPressOut={() => this.setState({myButtonOpacity: 1})}>
+
+ Press me!
+
+
+ )
+}
+```
+
+This is computationally intensive compared to the original example - React needs to re-render the component hierarchy each time the opacity changes, even though other properties of the view and its children haven't changed. Usually this overhead isn't a concern but when performing continuous animations and responding to gestures, judiciously optimizing your components can improve your animations' fidelity.
+
+If you look at the implementation of `setNativeProps` in [NativeMethodsMixin](https://github.com/facebook/react-native/blob/master/Libraries/Renderer/oss/ReactNativeRenderer-prod.js) you will notice that it is a wrapper around `RCTUIManager.updateView` - this is the exact same function call that results from re-rendering - see [receiveComponent in ReactNativeBaseComponent.js](https://github.com/facebook/react/blob/master/src/renderers/native/ReactNativeBaseComponent.js).
+
+## Composite components and setNativeProps
+
+Composite components are not backed by a native view, so you cannot call `setNativeProps` on them. Consider this example:
+
+```SnackPlayer name=setNativeProps%20with%20Composite%20Components
+import React from 'react';
+import { Text, TouchableOpacity, View } from 'react-native';
+
+class MyButton extends React.Component {
+ render() {
+ return (
+
+ {this.props.label}
+
+ )
+ }
+}
+
+export default class App extends React.Component {
+ render() {
+ return (
+
+
+
+ )
+ }
+}
+```
+
+If you run this you will immediately see this error: `Touchable child must either be native or forward setNativeProps to a native component`. This occurs because `MyButton` isn't directly backed by a native view whose opacity should be set. You can think about it like this: if you define a component with `createReactClass` you would not expect to be able to set a style prop on it and have that work - you would need to pass the style prop down to a child, unless you are wrapping a native component. Similarly, we are going to forward `setNativeProps` to a native-backed child component.
+
+#### Forward setNativeProps to a child
+
+All we need to do is provide a `setNativeProps` method on our component that calls `setNativeProps` on the appropriate child with the given arguments.
+
+```SnackPlayer name=Forwarding%20setNativeProps
+import React from 'react';
+import { Text, TouchableOpacity, View } from 'react-native';
+
+class MyButton extends React.Component {
+ setNativeProps = (nativeProps) => {
+ this._root.setNativeProps(nativeProps);
+ }
+
+ render() {
+ return (
+ this._root = component} {...this.props}>
+ {this.props.label}
+
+ )
+ }
+}
+
+export default class App extends React.Component {
+ render() {
+ return (
+
+
+
+ )
+ }
+}
+```
+
+You can now use `MyButton` inside of `TouchableOpacity`! A sidenote for clarity: we used the [ref callback](https://reactjs.org/docs/refs-and-the-dom.html#adding-a-ref-to-a-dom-element) syntax here, rather than the traditional string-based ref.
+
+You may have noticed that we passed all of the props down to the child view using `{...this.props}`. The reason for this is that `TouchableOpacity` is actually a composite component, and so in addition to depending on `setNativeProps` on its child, it also requires that the child perform touch handling. To do this, it passes on [various props](view.md#onmoveshouldsetresponder) that call back to the `TouchableOpacity` component. `TouchableHighlight`, in contrast, is backed by a native view and only requires that we implement `setNativeProps`.
+
+## setNativeProps to clear TextInput value
+
+Another very common use case of `setNativeProps` is to clear the value of a TextInput. The `controlled` prop of TextInput can sometimes drop characters when the `bufferDelay` is low and the user types very quickly. Some developers prefer to skip this prop entirely and instead use `setNativeProps` to directly manipulate the TextInput value when necessary. For example, the following code demonstrates clearing the input when you tap a button:
+
+```SnackPlayer name=Clear%20text
+import React from 'react';
+import { TextInput, Text, TouchableOpacity, View } from 'react-native';
+
+export default class App extends React.Component {
+ clearText = () => {
+ this._textInput.setNativeProps({text: ''});
+ }
+
+ render() {
+ return (
+
+ this._textInput = component}
+ style={{height: 50, flex: 1, marginHorizontal: 20, borderWidth: 1, borderColor: '#ccc'}}
+ />
+
+ Clear text
+
+
+ );
+ }
+}
+```
+
+## Avoiding conflicts with the render function
+
+If you update a property that is also managed by the render function, you might end up with some unpredictable and confusing bugs because anytime the component re-renders and that property changes, whatever value was previously set from `setNativeProps` will be completely ignored and overridden.
+
+## setNativeProps & shouldComponentUpdate
+
+By [intelligently applying `shouldComponentUpdate`](https://reactjs.org/docs/optimizing-performance.html#avoid-reconciliation) you can avoid the unnecessary overhead involved in reconciling unchanged component subtrees, to the point where it may be performant enough to use `setState` instead of `setNativeProps`.
+
+## Other native methods
+
+The methods described here are available on most of the default components provided by React Native. Note, however, that they are _not_ available on composite components that aren't directly backed by a native view. This will generally include most components that you define in your own app.
+
+### measure(callback)
+
+Determines the location on screen, width, and height of the given view and returns the values via an async callback. If successful, the callback will be called with the following arguments:
+
+* x
+* y
+* width
+* height
+* pageX
+* pageY
+
+Note that these measurements are not available until after the rendering has been completed in native. If you need the measurements as soon as possible, consider using the [`onLayout` prop](view.md#onlayout) instead.
+
+### measureInWindow(callback)
+
+Determines the location of the given view in the window and returns the values via an async callback. If the React root view is embedded in another native view, this will give you the absolute coordinates. If successful, the callback will be called with the following arguments:
+
+* x
+* y
+* width
+* height
+
+### measureLayout(relativeToNativeNode, onSuccess, onFail)
+
+Like `measure()`, but measures the view relative an ancestor, specified as `relativeToNativeNode`. This means that the returned x, y are relative to the origin x, y of the ancestor view.
+
+As always, to obtain a native node handle for a component, you can use `findNodeHandle(component)`.
+
+```javascript
+import {findNodeHandle} from 'react-native';
+```
+
+### focus()
+
+Requests focus for the given input or view. The exact behavior triggered will depend on the platform and type of view.
+
+### blur()
+
+Removes focus from an input or view. This is the opposite of `focus()`.
diff --git a/docs/drawerlayoutandroid.md b/docs/drawerlayoutandroid.md
new file mode 100644
index 0000000..8da7c88
--- /dev/null
+++ b/docs/drawerlayoutandroid.md
@@ -0,0 +1,199 @@
+---
+id: drawerlayoutandroid
+title: DrawerLayoutAndroid
+---
+
+React component that wraps the platform `DrawerLayout` (Android only). The Drawer (typically used for navigation) is rendered with `renderNavigationView` and direct children are the main view (where your content goes). The navigation view is initially not visible on the screen, but can be pulled in from the side of the window specified by the `drawerPosition` prop and its width can be set by the `drawerWidth` prop.
+
+Example:
+
+```javascript
+render: function() {
+ var navigationView = (
+
+ I'm in the Drawer!
+
+ );
+ return (
+ navigationView}>
+
+ Hello
+ World!
+
+
+ );
+},
+```
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`renderNavigationView`](drawerlayoutandroid.md#rendernavigationview)
+- [`onDrawerClose`](drawerlayoutandroid.md#ondrawerclose)
+- [`drawerPosition`](drawerlayoutandroid.md#drawerposition)
+- [`drawerWidth`](drawerlayoutandroid.md#drawerwidth)
+- [`keyboardDismissMode`](drawerlayoutandroid.md#keyboarddismissmode)
+- [`drawerLockMode`](drawerlayoutandroid.md#drawerlockmode)
+- [`onDrawerOpen`](drawerlayoutandroid.md#ondraweropen)
+- [`onDrawerSlide`](drawerlayoutandroid.md#ondrawerslide)
+- [`onDrawerStateChanged`](drawerlayoutandroid.md#ondrawerstatechanged)
+- [`drawerBackgroundColor`](drawerlayoutandroid.md#drawerbackgroundcolor)
+- [`statusBarBackgroundColor`](drawerlayoutandroid.md#statusbarbackgroundcolor)
+
+### Methods
+
+* [`openDrawer`](drawerlayoutandroid.md#opendrawer)
+* [`closeDrawer`](drawerlayoutandroid.md#closedrawer)
+
+---
+
+# Reference
+
+## Props
+
+### `renderNavigationView`
+
+The navigation view that will be rendered to the side of the screen and can be pulled in.
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+---
+
+### `onDrawerClose`
+
+Function called whenever the navigation view has been closed.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `drawerPosition`
+
+Specifies the side of the screen from which the drawer will slide in.
+
+| Type | Required |
+| ------------------------------------------------------------------------- | -------- |
+| enum(DrawerConsts.DrawerPosition.Left, DrawerConsts.DrawerPosition.Right) | No |
+
+---
+
+### `drawerWidth`
+
+Specifies the width of the drawer, more precisely the width of the view that be pulled in from the edge of the window.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `keyboardDismissMode`
+
+Determines whether the keyboard gets dismissed in response to a drag.
+
+* 'none' (the default), drags do not dismiss the keyboard.
+* 'on-drag', the keyboard is dismissed when a drag begins.
+
+| Type | Required |
+| ----------------------- | -------- |
+| enum('none', 'on-drag') | No |
+
+---
+
+### `drawerLockMode`
+
+Specifies the lock mode of the drawer. The drawer can be locked in 3 states:
+
+* unlocked (default), meaning that the drawer will respond (open/close) to touch gestures.
+* locked-closed, meaning that the drawer will stay closed and not respond to gestures.
+* locked-open, meaning that the drawer will stay opened and not respond to gestures. The drawer may still be opened and closed programmatically (`openDrawer`/`closeDrawer`).
+
+| Type | Required |
+| ------------------------------------------------ | -------- |
+| enum('unlocked', 'locked-closed', 'locked-open') | No |
+
+---
+
+### `onDrawerOpen`
+
+Function called whenever the navigation view has been opened.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onDrawerSlide`
+
+Function called whenever there is an interaction with the navigation view.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onDrawerStateChanged`
+
+Function called when the drawer state has changed. The drawer can be in 3 states:
+
+* idle, meaning there is no interaction with the navigation view happening at the time
+* dragging, meaning there is currently an interaction with the navigation view
+* settling, meaning that there was an interaction with the navigation view, and the navigation view is now finishing its closing or opening animation
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `drawerBackgroundColor`
+
+Specifies the background color of the drawer. The default value is white. If you want to set the opacity of the drawer, use rgba. Example:
+
+```javascript
+return ;
+```
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `statusBarBackgroundColor`
+
+Make the drawer take the entire screen and draw the background of the status bar to allow it to open over the status bar. It will only have an effect on API 21+.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+## Methods
+
+### `openDrawer()`
+
+```javascript
+openDrawer();
+```
+
+Opens the drawer.
+
+---
+
+### `closeDrawer()`
+
+```javascript
+closeDrawer();
+```
+
+Closes the drawer.
diff --git a/docs/easing.md b/docs/easing.md
new file mode 100644
index 0000000..0158086
--- /dev/null
+++ b/docs/easing.md
@@ -0,0 +1,260 @@
+---
+id: easing
+title: Easing
+---
+
+The `Easing` module implements common easing functions. This module is used by [Animated.timing()](animated.md#timing) to convey physically believable motion in animations.
+
+You can find a visualization of some common easing functions at http://easings.net/
+
+### Predefined animations
+
+The `Easing` module provides several predefined animations through the following methods:
+
+* [`back`](easing.md#back) provides a simple animation where the object goes slightly back before moving forward
+* [`bounce`](easing.md#bounce) provides a bouncing animation
+* [`ease`](easing.md#ease) provides a simple inertial animation
+* [`elastic`](easing.md#elastic) provides a simple spring interaction
+
+### Standard functions
+
+Three standard easing functions are provided:
+
+* [`linear`](easing.md#linear)
+* [`quad`](easing.md#quad)
+* [`cubic`](easing.md#cubic)
+
+The [`poly`](easing.md#poly) function can be used to implement quartic, quintic, and other higher power functions.
+
+### Additional functions
+
+Additional mathematical functions are provided by the following methods:
+
+* [`bezier`](easing.md#bezier) provides a cubic bezier curve
+* [`circle`](easing.md#circle) provides a circular function
+* [`sin`](easing.md#sin) provides a sinusoidal function
+* [`exp`](easing.md#exp) provides an exponential function
+
+The following helpers are used to modify other easing functions.
+
+* [`in`](easing.md#in) runs an easing function forwards
+* [`inOut`](easing.md#inout) makes any easing function symmetrical
+* [`out`](easing.md#out) runs an easing function backwards
+
+### Methods
+
+* [`step0`](easing.md#step0)
+* [`step1`](easing.md#step1)
+* [`linear`](easing.md#linear)
+* [`ease`](easing.md#ease)
+* [`quad`](easing.md#quad)
+* [`cubic`](easing.md#cubic)
+* [`poly`](easing.md#poly)
+* [`sin`](easing.md#sin)
+* [`circle`](easing.md#circle)
+* [`exp`](easing.md#exp)
+* [`elastic`](easing.md#elastic)
+* [`back`](easing.md#back)
+* [`bounce`](easing.md#bounce)
+* [`bezier`](easing.md#bezier)
+* [`in`](easing.md#in)
+* [`out`](easing.md#out)
+* [`inOut`](easing.md#inout)
+
+---
+
+# Reference
+
+## Methods
+
+### `step0()`
+
+```javascript
+static step0(n)
+```
+
+A stepping function, returns 1 for any positive value of `n`.
+
+---
+
+### `step1()`
+
+```javascript
+static step1(n)
+```
+
+A stepping function, returns 1 if `n` is greater than or equal to 1.
+
+---
+
+### `linear()`
+
+```javascript
+static linear(t)
+```
+
+A linear function, `f(t) = t`. Position correlates to elapsed time one to one.
+
+http://cubic-bezier.com/#0,0,1,1
+
+---
+
+### `ease()`
+
+```javascript
+static ease(t)
+```
+
+A simple inertial interaction, similar to an object slowly accelerating to speed.
+
+http://cubic-bezier.com/#.42,0,1,1
+
+---
+
+### `quad()`
+
+```javascript
+static quad(t)
+```
+
+A quadratic function, `f(t) = t * t`. Position equals the square of elapsed time.
+
+http://easings.net/#easeInQuad
+
+---
+
+### `cubic()`
+
+```javascript
+static cubic(t)
+```
+
+A cubic function, `f(t) = t * t * t`. Position equals the cube of elapsed time.
+
+http://easings.net/#easeInCubic
+
+---
+
+### `poly()`
+
+```javascript
+static poly(n)
+```
+
+A power function. Position is equal to the Nth power of elapsed time.
+
+n = 4: http://easings.net/#easeInQuart n = 5: http://easings.net/#easeInQuint
+
+---
+
+### `sin()`
+
+```javascript
+static sin(t)
+```
+
+A sinusoidal function.
+
+http://easings.net/#easeInSine
+
+---
+
+### `circle()`
+
+```javascript
+static circle(t)
+```
+
+A circular function.
+
+http://easings.net/#easeInCirc
+
+---
+
+### `exp()`
+
+```javascript
+static exp(t)
+```
+
+An exponential function.
+
+http://easings.net/#easeInExpo
+
+---
+
+### `elastic()`
+
+```javascript
+static elastic(bounciness)
+```
+
+A simple elastic interaction, similar to a spring oscillating back and forth.
+
+Default bounciness is 1, which overshoots a little bit once. 0 bounciness doesn't overshoot at all, and bounciness of N > 1 will overshoot about N times.
+
+http://easings.net/#easeInElastic
+
+---
+
+### `back()`
+
+```javascript
+static back(s)
+```
+
+Use with `Animated.parallel()` to create a simple effect where the object animates back slightly as the animation starts.
+
+---
+
+### `bounce()`
+
+```javascript
+static bounce(t)
+```
+
+Provides a simple bouncing effect.
+
+http://easings.net/#easeInBounce
+
+---
+
+### `bezier()`
+
+```javascript
+static bezier(x1, y1, x2, y2)
+```
+
+Provides a cubic bezier curve, equivalent to CSS Transitions' `transition-timing-function`.
+
+A useful tool to visualize cubic bezier curves can be found at http://cubic-bezier.com/
+
+---
+
+### `in()`
+
+```javascript
+static in easing;
+```
+
+Runs an easing function forwards.
+
+---
+
+### `out()`
+
+```javascript
+static out(easing)
+```
+
+Runs an easing function backwards.
+
+---
+
+### `inOut()`
+
+```javascript
+static inOut(easing)
+```
+
+Makes any easing function symmetrical. The easing function will run forwards for half of the duration, then backwards for the rest of the duration.
diff --git a/docs/flatlist.md b/docs/flatlist.md
new file mode 100644
index 0000000..33c4421
--- /dev/null
+++ b/docs/flatlist.md
@@ -0,0 +1,608 @@
+---
+id: flatlist
+title: FlatList
+---
+
+A performant interface for rendering simple, flat lists, supporting the most handy features:
+
+* Fully cross-platform.
+* Optional horizontal mode.
+* Configurable viewability callbacks.
+* Header support.
+* Footer support.
+* Separator support.
+* Pull to Refresh.
+* Scroll loading.
+* ScrollToIndex support.
+
+If you need section support, use [``](sectionlist.md).
+
+Minimal Example:
+
+```javascript
+{item.key}}
+/>
+```
+
+More complex, multi-select example demonstrating `PureComponent` usage for perf optimization and avoiding bugs.
+
+* By binding the `onPressItem` handler, the props will remain `===` and `PureComponent` will prevent wasteful re-renders unless the actual `id`, `selected`, or `title` props change, even if the components rendered in `MyListItem` did not have such optimizations.
+* By passing `extraData={this.state}` to `FlatList` we make sure `FlatList` itself will re-render when the `state.selected` changes. Without setting this prop, `FlatList` would not know it needs to re-render any items because it is also a `PureComponent` and the prop comparison will not show any changes.
+* `keyExtractor` tells the list to use the `id`s for the react keys instead of the default `key` property.
+
+```javascript
+class MyListItem extends React.PureComponent {
+ _onPress = () => {
+ this.props.onPressItem(this.props.id);
+ };
+
+ render() {
+ const textColor = this.props.selected ? 'red' : 'black';
+ return (
+
+
+ {this.props.title}
+
+
+ );
+ }
+}
+
+class MultiSelectList extends React.PureComponent {
+ state = {selected: (new Map(): Map)};
+
+ _keyExtractor = (item, index) => item.id;
+
+ _onPressItem = (id: string) => {
+ // updater functions are preferred for transactional updates
+ this.setState((state) => {
+ // copy the map rather than modifying state.
+ const selected = new Map(state.selected);
+ selected.set(id, !selected.get(id)); // toggle
+ return {selected};
+ });
+ };
+
+ _renderItem = ({item}) => (
+
+ );
+
+ render() {
+ return (
+
+ );
+ }
+}
+```
+
+This is a convenience wrapper around [``](virtualizedlist.md), and thus inherits its props (as well as those of [``](scrollview.md)) that aren't explicitly listed here, along with the following caveats:
+
+* Internal state is not preserved when content scrolls out of the render window. Make sure all your data is captured in the item data or external stores like Flux, Redux, or Relay.
+* This is a `PureComponent` which means that it will not re-render if `props` remain shallow- equal. Make sure that everything your `renderItem` function depends on is passed as a prop (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on changes. This includes the `data` prop and parent component state.
+* In order to constrain memory and enable smooth scrolling, content is rendered asynchronously offscreen. This means it's possible to scroll faster than the fill rate and momentarily see blank content. This is a tradeoff that can be adjusted to suit the needs of each application, and we are working on improving it behind the scenes.
+* By default, the list looks for a `key` prop on each item and uses that for the React key. Alternatively, you can provide a custom `keyExtractor` prop.
+
+Also inherits [ScrollView Props](scrollview.md#props), unless it is nested in another FlatList of same orientation.
+
+### Props
+
+* [`ScrollView` props...](scrollview.md#props)
+* [`VirtualizedList` props...](virtualizedlist.md#props)
+* [`renderItem`](flatlist.md#renderitem)
+* [`data`](flatlist.md#data)
+* [`ItemSeparatorComponent`](flatlist.md#itemseparatorcomponent)
+* [`ListEmptyComponent`](flatlist.md#listemptycomponent)
+* [`ListFooterComponent`](flatlist.md#listfootercomponent)
+* [`ListHeaderComponent`](flatlist.md#listheadercomponent)
+* [`columnWrapperStyle`](flatlist.md#columnwrapperstyle)
+* [`extraData`](flatlist.md#extradata)
+* [`getItemLayout`](flatlist.md#getitemlayout)
+* [`horizontal`](flatlist.md#horizontal)
+* [`initialNumToRender`](flatlist.md#initialnumtorender)
+* [`initialScrollIndex`](flatlist.md#initialscrollindex)
+* [`inverted`](flatlist.md#inverted)
+* [`keyExtractor`](flatlist.md#keyextractor)
+* [`numColumns`](flatlist.md#numcolumns)
+* [`onEndReached`](flatlist.md#onendreached)
+* [`onEndReachedThreshold`](flatlist.md#onendreachedthreshold)
+* [`onRefresh`](flatlist.md#onrefresh)
+* [`onViewableItemsChanged`](flatlist.md#onviewableitemschanged)
+* [`progressViewOffset`](flatlist.md#progressviewoffset)
+* [`legacyImplementation`](flatlist.md#legacyimplementation)
+* [`refreshing`](flatlist.md#refreshing)
+* [`removeClippedSubviews`](flatlist.md#removeclippedsubviews)
+* [`viewabilityConfig`](flatlist.md#viewabilityconfig)
+* [`viewabilityConfigCallbackPairs`](flatlist.md#viewabilityconfigcallbackpairs)
+
+### Methods
+
+* [`scrollToEnd`](flatlist.md#scrolltoend)
+* [`scrollToIndex`](flatlist.md#scrolltoindex)
+* [`scrollToItem`](flatlist.md#scrolltoitem)
+* [`scrollToOffset`](flatlist.md#scrolltooffset)
+* [`recordInteraction`](flatlist.md#recordinteraction)
+* [`flashScrollIndicators`](flatlist.md#flashscrollindicators)
+
+---
+
+# Reference
+
+## Props
+
+### `renderItem`
+
+```javascript
+renderItem({ item: Object, index: number, separators: { highlight: Function, unhighlight: Function, updateProps: Function(select: string, newProps: Object) } }) => ?React.Element
+```
+
+Takes an item from `data` and renders it into the list.
+
+Provides additional metadata like `index` if you need it, as well as a more generic `separators.updateProps` function which let you set whatever props you want to change the rendering of either the leading separator or trailing separator in case the more common `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for your use case.
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+Example usage:
+
+```javascript
+ (
+
+ )}
+ data={[{title: 'Title Text', key: 'item1'}]}
+ renderItem={({item, separators}) => (
+ this._onPress(item)}
+ onShowUnderlay={separators.highlight}
+ onHideUnderlay={separators.unhighlight}>
+
+ {item.title}
+
+
+ )}
+/>
+```
+
+---
+
+### `data`
+
+For simplicity, data is just a plain array. If you want to use something else, like an immutable list, use the underlying [`VirtualizedList`](virtualizedlist.md) directly.
+
+| Type | Required |
+| ----- | -------- |
+| array | Yes |
+
+---
+
+### `ItemSeparatorComponent`
+
+Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`.
+
+| Type | Required |
+| --------- | -------- |
+| component | No |
+
+---
+
+### `ListEmptyComponent`
+
+Rendered when the list is empty. Can be a React Component Class, a render function, or a rendered element.
+
+| Type | Required |
+| ---------------------------- | -------- |
+| component, function, element | No |
+
+---
+
+### `ListFooterComponent`
+
+Rendered at the bottom of all the items. Can be a React Component Class, a render function, or a rendered element.
+
+| Type | Required |
+| ---------------------------- | -------- |
+| component, function, element | No |
+
+---
+
+### `ListHeaderComponent`
+
+Rendered at the top of all the items. Can be a React Component Class, a render function, or a rendered element.
+
+| Type | Required |
+| ---------------------------- | -------- |
+| component, function, element | No |
+
+---
+
+### `columnWrapperStyle`
+
+Optional custom style for multi-item rows generated when `numColumns > 1`.
+
+| Type | Required |
+| ------------ | -------- |
+| style object | No |
+
+---
+
+### `extraData`
+
+A marker property for telling the list to re-render (since it implements `PureComponent`). If any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the `data` prop, stick it here and treat it immutably.
+
+| Type | Required |
+| ---- | -------- |
+| any | No |
+
+---
+
+### `getItemLayout`
+
+```javascript
+(data, index) => {length: number, offset: number, index: number}
+```
+
+`getItemLayout` is an optional optimization that let us skip the measurement of dynamic content if you know the height of items ahead of time. `getItemLayout` is both efficient and easy to use if you have fixed height items, for example:
+
+```javascript
+ getItemLayout={(data, index) => (
+ {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index}
+ )}
+```
+
+Adding `getItemLayout` can be a great performance boost for lists of several hundred items. Remember to include separator length (height or width) in your offset calculation if you specify `ItemSeparatorComponent`.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `horizontal`
+
+If true, renders items next to each other horizontally instead of stacked vertically.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `initialNumToRender`
+
+How many items to render in the initial batch. This should be enough to fill the screen but not much more. Note these items will never be unmounted as part of the windowed rendering in order to improve perceived performance of scroll-to-top actions.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `initialScrollIndex`
+
+Instead of starting at the top with the first item, start at `initialScrollIndex`. This disables the "scroll to top" optimization that keeps the first `initialNumToRender` items always rendered and immediately renders the items starting at this initial index. Requires `getItemLayout` to be implemented.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `inverted`
+
+Reverses the direction of scroll. Uses scale transforms of `-1`.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `keyExtractor`
+
+```javascript
+(item: object, index: number) => string;
+```
+
+Used to extract a unique key for a given item at the specified index. Key is used for caching and as the react key to track item re-ordering. The default extractor checks `item.key`, then falls back to using the index, like React does.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `numColumns`
+
+Multiple columns can only be rendered with `horizontal={false}` and will zig-zag like a `flexWrap` layout. Items should all be the same height - masonry layouts are not supported.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `onEndReached`
+
+```javascript
+(info: {distanceFromEnd: number}) => void
+```
+
+Called once when the scroll position gets within `onEndReachedThreshold` of the rendered content.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onEndReachedThreshold`
+
+How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the `onEndReached` callback. Thus a value of 0.5 will trigger `onEndReached` when the end of the content is within half the visible length of the list.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `onRefresh`
+
+```javascript
+() => void
+```
+
+If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the `refreshing` prop correctly.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onViewableItemsChanged`
+
+```javascript
+(info: {
+ viewableItems: array,
+ changed: array,
+ }) => void
+```
+
+Called when the viewability of rows changes, as defined by the `viewabilityConfig` prop.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `progressViewOffset`
+
+Set this when offset is needed for the loading indicator to show correctly.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | Android |
+
+---
+
+### `legacyImplementation`
+
+May not have full feature parity and is meant for debugging and performance comparison.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `refreshing`
+
+Set this true while waiting for new data from a refresh.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `removeClippedSubviews`
+
+This may improve scroll performance for large lists.
+
+> Note: May have bugs (missing content) in some circumstances - use at your own risk.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `viewabilityConfig`
+
+See `ViewabilityHelper.js` for flow type and further documentation.
+
+| Type | Required |
+| ----------------- | -------- |
+| ViewabilityConfig | No |
+
+`viewabilityConfig` takes a type `ViewabilityConfig` an object with following properties
+
+| Property | Required | Type |
+| -------------------------------- | -------- | ------- |
+| minimumViewTime | No | number |
+| viewAreaCoveragePercentThreshold | No | number |
+| itemVisiblePercentThreshold | No | number |
+| waitForInteraction | No | boolean |
+
+At least one of the `viewAreaCoveragePercentThreshold` or `itemVisiblePercentThreshold` is required. This needs to be done in the `constructor` to avoid following error ([ref](https://github.com/facebook/react-native/issues/17408)):
+
+```
+ Error: Changing viewabilityConfig on the fly is not supported`
+```
+
+```javascript
+constructor (props) {
+ super(props)
+
+ this.viewabilityConfig = {
+ waitForInteraction: true,
+ viewAreaCoveragePercentThreshold: 95
+ }
+}
+```
+
+```javascript
+ Note: Cannot scroll to locations outside the render window without specifying the `getItemLayout` prop.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ----------- |
+| params | object | Yes | See below. |
+
+Valid `params` keys are:
+
+* 'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to `true`.
+* 'index' (number) - The index to scroll to. Required.
+* 'viewOffset' (number) - A fixed number of pixels to offset the final target position. Required.
+* 'viewPosition' (number) - A value of `0` places the item specified by index at the top, `1` at the bottom, and `0.5` centered in the middle.
+
+---
+
+### `scrollToItem()`
+
+```javascript
+scrollToItem(params);
+```
+
+Requires linear scan through data - use `scrollToIndex` instead if possible.
+
+> Note: Cannot scroll to locations outside the render window without specifying the `getItemLayout` prop.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ----------- |
+| params | object | Yes | See below. |
+
+Valid `params` keys are:
+
+* 'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to `true`.
+* 'item' (object) - The item to scroll to. Required.
+* 'viewPosition' (number)
+
+---
+
+### `scrollToOffset()`
+
+```javascript
+scrollToOffset(params);
+```
+
+Scroll to a specific content pixel offset in the list.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ----------- |
+| params | object | Yes | See below. |
+
+Valid `params` keys are:
+
+* 'offset' (number) - The offset to scroll to. In case of `horizontal` being true, the offset is the x-value, in any other case the offset is the y-value. Required.
+* 'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to `true`.
+
+---
+
+### `recordInteraction()`
+
+```javascript
+recordInteraction();
+```
+
+Tells the list an interaction has occurred, which should trigger viewability calculations, e.g. if `waitForInteractions` is true and the user has not scrolled. This is typically called by taps on items or by navigation actions.
+
+---
+
+### `flashScrollIndicators()`
+
+```javascript
+flashScrollIndicators();
+```
+
+Displays the scroll indicators momentarily.
diff --git a/docs/flexbox.md b/docs/flexbox.md
new file mode 100644
index 0000000..3f6eb29
--- /dev/null
+++ b/docs/flexbox.md
@@ -0,0 +1,105 @@
+---
+id: flexbox
+title: Layout with Flexbox
+---
+
+A component can specify the layout of its children using the flexbox algorithm. Flexbox is designed to provide a consistent layout on different screen sizes.
+
+You will normally use a combination of `flexDirection`, `alignItems`, and `justifyContent` to achieve the right layout.
+
+> Flexbox works the same way in React Native as it does in CSS on the web, with a few exceptions. The defaults are different, with `flexDirection` defaulting to `column` instead of `row`, and the `flex` parameter only supporting a single number.
+
+#### Flex Direction
+
+Adding `flexDirection` to a component's `style` determines the **primary axis** of its layout. Should the children be organized horizontally (`row`) or vertically (`column`)? The default is `column`.
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, View } from 'react-native';
+
+export default class FlexDirectionBasics extends Component {
+ render() {
+ return (
+ // Try setting `flexDirection` to `column`.
+
+
+
+
+
+ );
+ }
+};
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => FlexDirectionBasics);
+```
+
+#### Justify Content
+
+Adding `justifyContent` to a component's style determines the **distribution** of children along the **primary axis**. Should children be distributed at the start, the center, the end, or spaced evenly? Available options are `flex-start`, `center`, `flex-end`, `space-around`, `space-between` and `space-evenly`.
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, View } from 'react-native';
+
+export default class JustifyContentBasics extends Component {
+ render() {
+ return (
+ // Try setting `justifyContent` to `center`.
+ // Try setting `flexDirection` to `row`.
+
+
+
+
+
+ );
+ }
+};
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => JustifyContentBasics);
+```
+
+#### Align Items
+
+Adding `alignItems` to a component's style determines the **alignment** of children along the **secondary axis** (if the primary axis is `row`, then the secondary is `column`, and vice versa). Should children be aligned at the start, the center, the end, or stretched to fill? Available options are `flex-start`, `center`, `flex-end`, and `stretch`.
+
+> For `stretch` to have an effect, children must not have a fixed dimension along the secondary axis. In the following example, setting `alignItems: stretch` does nothing until the `width: 50` is removed from the children.
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, View } from 'react-native';
+
+export default class AlignItemsBasics extends Component {
+ render() {
+ return (
+ // Try setting `alignItems` to 'flex-start'
+ // Try setting `justifyContent` to `flex-end`.
+ // Try setting `flexDirection` to `row`.
+
+
+
+
+
+ );
+ }
+};
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => AlignItemsBasics);
+```
+
+#### Going Deeper
+
+We've covered the basics, but there are many other styles you may need for layouts. The full list of props that control layout is documented [here](./layout-props.md).
+
+We're getting close to being able to build a real application. One thing we are still missing is a way to take user input, so let's move on to [learn how to handle text input with the TextInput component](handling-text-input.md).
diff --git a/docs/geolocation.md b/docs/geolocation.md
new file mode 100644
index 0000000..f586bd2
--- /dev/null
+++ b/docs/geolocation.md
@@ -0,0 +1,165 @@
+---
+id: geolocation
+title: Geolocation
+---
+
+The Geolocation API extends the [Geolocation web spec](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation).
+
+As a browser polyfill, this API is available through the `navigator.geolocation` global - you do not need to `import` it.
+
+On Android, this uses the [android.location API](https://developer.android.com/reference/android/location/package-summary). This API is not recommended by Google because it is less accurate and slower than the recommended [Google Location Services API](https://developer.android.com/training/location/). In order to use it with React Native, use the [react-native-geolocation-service](https://github.com/Agontuk/react-native-geolocation-service) module.
+
+### Configuration and Permissions
+
+
+
Projects with Native Code Only
+
+ This section only applies to projects made with react-native init
+ or to those made with expo init or Create React Native App which have since ejected. For
+ more information about ejecting, please see
+ the guide on
+ the Create React Native App repository.
+
+
+
+#### iOS
+
+You need to include the `NSLocationWhenInUseUsageDescription` key in Info.plist to enable geolocation when using the app. Geolocation is enabled by default when you create a project with `react-native init`.
+
+In order to enable geolocation in the background, you need to include the 'NSLocationAlwaysUsageDescription' key in Info.plist and add location as a background mode in the 'Capabilities' tab in Xcode.
+
+If you are using CocoaPods for React Native, make sure to include the `RCTGeolocation` sub-podspec.
+
+#### Android
+
+To request access to location, you need to add the following line to your app's `AndroidManifest.xml`:
+
+``
+
+Android API >= 18 Positions will also contain a `mocked` boolean to indicate if position was created from a mock provider.
+
+
+ Android API >= 23 Requires an additional step to check for, and request
+ the ACCESS_FINE_LOCATION permission using
+ the PermissionsAndroid API.
+ Failure to do so may result in a hard crash.
+
+
+### Methods
+
+* [`setRNConfiguration`](geolocation.md#setrnconfiguration)
+* [`requestAuthorization`](geolocation.md#requestauthorization)
+* [`getCurrentPosition`](geolocation.md#getcurrentposition)
+* [`watchPosition`](geolocation.md#watchposition)
+* [`clearWatch`](geolocation.md#clearwatch)
+* [`stopObserving`](geolocation.md#stopobserving)
+
+---
+
+# Reference
+
+## Methods
+
+### `setRNConfiguration()`
+
+```javascript
+geolocation.setRNConfiguration(config);
+```
+
+Sets configuration options that will be used in all location requests.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ----------- |
+| config | object | Yes | See below. |
+
+Supported options:
+
+* `skipPermissionRequests` (boolean, iOS-only) - Defaults to `false`. If `true`, you must request permissions before using Geolocation APIs.
+
+---
+
+### `requestAuthorization()`
+
+```javascript
+geolocation.requestAuthorization();
+```
+
+Request suitable Location permission based on the key configured on pList. If NSLocationAlwaysUsageDescription is set, it will request Always authorization, although if NSLocationWhenInUseUsageDescription is set, it will request InUse authorization.
+
+---
+
+### `getCurrentPosition()`
+
+```javascript
+geolocation.getCurrentPosition(geo_success, [geo_error], [geo_options]);
+```
+
+Invokes the success callback once with the latest location info.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------- | -------- | -------- | ----------------------------------------- |
+| geo_success | function | Yes | Invoked with latest location info. |
+| geo_error | function | No | Invoked whenever an error is encountered. |
+| geo_options | object | No | See below. |
+
+Supported options:
+
+* `timeout` (ms) - Is a positive value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. Defaults to INFINITY.
+* `maximumAge` (ms) - Is a positive value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device will always return a cached position regardless of its age. Defaults to INFINITY.
+* `enableHighAccuracy` (bool) - Is a boolean representing if to use GPS or not. If set to true, a GPS position will be requested. If set to false, a WIFI location will be requested.
+
+---
+
+### `watchPosition()`
+
+```javascript
+geolocation.watchPosition(success, [error], [options]);
+```
+
+Invokes the success callback whenever the location changes. Returns a `watchId` (number).
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | -------- | -------- | ----------------------------------------- |
+| success | function | Yes | Invoked whenever the location changes. |
+| error | function | No | Invoked whenever an error is encountered. |
+| options | object | No | See below. |
+
+Supported options:
+
+* `timeout` (ms) - Is a positive value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. Defaults to INFINITY.
+* `maximumAge` (ms) - Is a positive value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device will always return a cached position regardless of its age. Defaults to INFINITY.
+* `enableHighAccuracy` (bool) - Is a boolean representing if to use GPS or not. If set to true, a GPS position will be requested. If set to false, a WIFI location will be requested.
+* `distanceFilter` (m) - The minimum distance from the previous location to exceed before returning a new location. Set to 0 to not filter locations. Defaults to 100m.
+* `useSignificantChanges` (bool) - Uses the battery-efficient native significant changes APIs to return locations. Locations will only be returned when the device detects a significant distance has been breached. Defaults to FALSE.
+
+---
+
+### `clearWatch()`
+
+```javascript
+geolocation.clearWatch(watchID);
+```
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | ------ | -------- | ------------------------------------ |
+| watchID | number | Yes | Id as returned by `watchPosition()`. |
+
+---
+
+### `stopObserving()`
+
+```javascript
+geolocation.stopObserving();
+```
+
+Stops observing for device location changes. In addition, it removes all listeners previously registered.
+
+Notice that this method has only effect if the `geolocation.watchPosition(successCallback, errorCallback)` method was previously invoked.
diff --git a/docs/gesture-responder-system.md b/docs/gesture-responder-system.md
new file mode 100644
index 0000000..04c3b9c
--- /dev/null
+++ b/docs/gesture-responder-system.md
@@ -0,0 +1,66 @@
+---
+id: gesture-responder-system
+title: Gesture Responder System
+---
+
+The gesture responder system manages the lifecycle of gestures in your app. A touch can go through several phases as the app determines what the user's intention is. For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. This can even change during the duration of a touch. There can also be multiple simultaneous touches.
+
+The touch responder system is needed to allow components to negotiate these touch interactions without any additional knowledge about their parent or child components.
+
+### Best Practices
+
+To make your app feel great, every action should have the following attributes:
+
+* Feedback/highlighting- show the user what is handling their touch, and what will happen when they release the gesture
+* Cancel-ability- when making an action, the user should be able to abort it mid-touch by dragging their finger away
+
+These features make users more comfortable while using an app, because it allows people to experiment and interact without fear of making mistakes.
+
+### TouchableHighlight and Touchable\*
+
+The responder system can be complicated to use. So we have provided an abstract `Touchable` implementation for things that should be "tappable". This uses the responder system and allows you to easily configure tap interactions declaratively. Use `TouchableHighlight` anywhere where you would use a button or link on web.
+
+## Responder Lifecycle
+
+A view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder:
+
+* `View.props.onStartShouldSetResponder: (evt) => true,` - Does this view want to become responder on the start of a touch?
+* `View.props.onMoveShouldSetResponder: (evt) => true,` - Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?
+
+If the View returns true and attempts to become the responder, one of the following will happen:
+
+* `View.props.onResponderGrant: (evt) => {}` - The View is now responding for touch events. This is the time to highlight and show the user what is happening
+* `View.props.onResponderReject: (evt) => {}` - Something else is the responder right now and will not release it
+
+If the view is responding, the following handlers can be called:
+
+* `View.props.onResponderMove: (evt) => {}` - The user is moving their finger
+* `View.props.onResponderRelease: (evt) => {}` - Fired at the end of the touch, ie "touchUp"
+* `View.props.onResponderTerminationRequest: (evt) => true` - Something else wants to become responder. Should this view release the responder? Returning true allows release
+* `View.props.onResponderTerminate: (evt) => {}` - The responder has been taken from the View. Might be taken by other views after a call to `onResponderTerminationRequest`, or might be taken by the OS without asking (happens with control center/ notification center on iOS)
+
+`evt` is a synthetic touch event with the following form:
+
+* `nativeEvent`
+ * `changedTouches` - Array of all touch events that have changed since the last event
+ * `identifier` - The ID of the touch
+ * `locationX` - The X position of the touch, relative to the element
+ * `locationY` - The Y position of the touch, relative to the element
+ * `pageX` - The X position of the touch, relative to the root element
+ * `pageY` - The Y position of the touch, relative to the root element
+ * `target` - The node id of the element receiving the touch event
+ * `timestamp` - A time identifier for the touch, useful for velocity calculation
+ * `touches` - Array of all current touches on the screen
+
+### Capture ShouldSet Handlers
+
+`onStartShouldSetResponder` and `onMoveShouldSetResponder` are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for `*ShouldSetResponder` handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable.
+
+However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing `on*ShouldSetResponderCapture`. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a `onStartShouldSetResponderCapture` handler which returns true.
+
+* `View.props.onStartShouldSetResponderCapture: (evt) => true,`
+* `View.props.onMoveShouldSetResponderCapture: (evt) => true,`
+
+### PanResponder
+
+For higher-level gesture interpretation, check out [PanResponder](panresponder.md).
diff --git a/docs/getting-started.md b/docs/getting-started.md
new file mode 100644
index 0000000..a0c047b
--- /dev/null
+++ b/docs/getting-started.md
@@ -0,0 +1,716 @@
+---
+id: getting-started
+title: Getting Started
+---
+
+
+
+This page will help you install and build your first React Native app. If you already have React Native installed, you can skip ahead to the [Tutorial](tutorial.md).
+
+
+
+
+ Quick Start
+
+
+ Building Projects with Native Code
+
+
+
+
+
+
+[Expo](https://expo.io) is the easiest way to start building a new React Native application. It allows you to start a project without installing or configuring any tools to build native code - no Xcode or Android Studio installation required (see [Caveats](getting-started.md#caveats)).
+
+Assuming that you have [Node 8+](https://nodejs.org/en/download/) installed, you can use npm to install the Expo CLI command line utility:
+
+```sh
+npm install -g expo-cli
+```
+
+Then run the following commands to create a new React Native project called "AwesomeProject":
+
+```sh
+expo init AwesomeProject
+
+cd AwesomeProject
+npm start #you can also use: expo start
+```
+
+This will start a development server for you.
+
+## Running your React Native application
+
+Install the [Expo](https://expo.io) client app on your iOS or Android phone and connect to the same wireless network as your computer. On Android, use the Expo app to scan the QR code from your terminal to open your project. On iOS, follow on-screen instructions to get a link.
+
+### Modifying your app
+
+Now that you have successfully run the app, let's modify it. Open `App.js` in your text editor of choice and edit some lines. The application should reload automatically once you save your changes.
+
+### That's it!
+
+Congratulations! You've successfully run and modified your first React Native app.
+
+
+
+## Now what?
+
+Expo also has [docs](https://docs.expo.io) you can reference if you have questions specific to the tool. You can also ask for help at [Expo forums](https://forums.expo.io).
+
+If you have a problem with Expo, before creating a new issue, please see if there's an existing issue about it:
+
+* in the [Expo CLI issues](https://github.com/expo/expo-cli/issues) (for issues related to Expo CLI), or
+* in the [Expo issues](https://github.com/expo/expo/issues) (for issues about the Expo client or SDK).
+
+If you're curious to learn more about React Native, continue on to the [Tutorial](tutorial.md).
+
+### Running your app on a simulator or virtual device
+
+Expo CLI makes it really easy to run your React Native app on a physical device without setting up a development environment. If you want to run your app on the iOS Simulator or an Android Virtual Device, please refer to the instructions for building projects with native code to learn how to install Xcode or set up your Android development environment.
+
+Once you've set these up, you can launch your app on an Android Virtual Device by running `npm run android`, or on the iOS Simulator by running `npm run ios` (macOS only).
+
+### Caveats
+
+Because you don't build any native code when using Expo to create a project, it's not possible to include custom native modules beyond the React Native APIs and components that are available in the Expo client app.
+
+If you know that you'll eventually need to include your own native code, Expo is still a good way to get started. In that case you'll just need to "[eject](https://docs.expo.io/versions/latest/expokit/eject)" eventually to create your own native builds. If you do eject, the "Building Projects with Native Code" instructions will be required to continue working on your project.
+
+Expo CLI configures your project to use the most recent React Native version that is supported by the Expo client app. The Expo client app usually gains support for a given React Native version about a week after the React Native version is released as stable. You can check [this document](https://docs.expo.io/versions/latest/sdk/#sdk-version) to find out what versions are supported.
+
+If you're integrating React Native into an existing project, you'll want to skip Expo CLI and go directly to setting up the native build environment. Select "Building Projects with Native Code" above for instructions on configuring a native build environment for React Native.
+
+
+
+
Follow these instructions if you need to build native code in your project. For example, if you are integrating React Native into an existing application, or if you "ejected" from Expo or Create React Native App, you'll need this section.
+
+The instructions are a bit different depending on your development operating system, and whether you want to start developing for iOS or Android. If you want to develop for both iOS and Android, that's fine - you just have to pick one to start with, since the setup is a bit different.
+
+
A Mac is required to build projects with native code for iOS. You can follow the Quick Start to learn how to build your app using Expo instead.
+
+
+
+## Installing dependencies
+
+You will need Node, Watchman, the React Native command line interface, and Xcode.
+
+While you can use any editor of your choice to develop your app, you will need to install Xcode in order to set up the necessary tooling to build your React Native app for iOS.
+
+
+
+## Installing dependencies
+
+You will need Node, Watchman, the React Native command line interface, a JDK, and Android Studio.
+
+
+
+## Installing dependencies
+
+You will need Node, the React Native command line interface, a JDK, and Android Studio.
+
+
+
+## Installing dependencies
+
+You will need Node, the React Native command line interface, Python2, a JDK, and Android Studio.
+
+
+
+While you can use any editor of your choice to develop your app, you will need to install Android Studio in order to set up the necessary tooling to build your React Native app for Android.
+
+
+
+### Node, Watchman
+
+We recommend installing Node and Watchman using [Homebrew](http://brew.sh/). Run the following commands in a Terminal after installing Homebrew:
+
+```
+brew install node
+brew install watchman
+```
+
+If you have already installed Node on your system, make sure it is Node 8.3 or newer.
+
+[Watchman](https://facebook.github.io/watchman) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance.
+
+
+
+### Node
+
+Follow the [installation instructions for your Linux distribution](https://nodejs.org/en/download/package-manager/) to install Node 8.3 or newer.
+
+
+
+### Node, Python2, JDK
+
+We recommend installing Node and Python2 via [Chocolatey](https://chocolatey.org), a popular package manager for Windows.
+
+React Native also requires a recent version of the [Java SE Development Kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html), as well as Python 2. Both can be installed using Chocolatey.
+
+Open an Administrator Command Prompt (right click Command Prompt and select "Run as Administrator"), then run the following command:
+
+```powershell
+choco install -y nodejs.install python2 jdk8
+```
+
+If you have already installed Node on your system, make sure it is Node 8.3 or newer. If you already have a JDK on your system, make sure it is version 8 or newer.
+
+> You can find additional installation options on [Node's Downloads page](https://nodejs.org/en/download/).
+
+
+
+### The React Native CLI
+
+Node comes with npm, which lets you install the React Native command line interface.
+
+Run the following command in a Terminal:
+
+```
+npm install -g react-native-cli
+```
+
+> If you get an error like `Cannot find module 'npmlog'`, try installing npm directly: `curl -0 -L https://npmjs.org/install.sh | sudo sh`.
+
+
+
+### The React Native CLI
+
+Node comes with npm, which lets you install the React Native command line interface.
+
+Run the following command in a Command Prompt or shell:
+
+```powershell
+npm install -g react-native-cli
+```
+
+> If you get an error like `Cannot find module 'npmlog'`, try installing npm directly: `curl -0 -L https://npmjs.org/install.sh | sudo sh`.
+
+
+
+### Xcode
+
+The easiest way to install Xcode is via the [Mac App Store](https://itunes.apple.com/us/app/xcode/id497799835?mt=12). Installing Xcode will also install the iOS Simulator and all the necessary tools to build your iOS app.
+
+If you have already installed Xcode on your system, make sure it is version 9.4 or newer.
+
+#### Command Line Tools
+
+You will also need to install the Xcode Command Line Tools. Open Xcode, then choose "Preferences..." from the Xcode menu. Go to the Locations panel and install the tools by selecting the most recent version in the Command Line Tools dropdown.
+
+
+
+
+
+### Java Development Kit
+
+React Native requires a recent version of the Java SE Development Kit (JDK). [Download and install Oracle JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) if needed. You can also use [OpenJDK 8](http://openjdk.java.net/install/) as an alternative.
+
+
+
+### Android development environment
+
+Setting up your development environment can be somewhat tedious if you're new to Android development. If you're already familiar with Android development, there are a few things you may need to configure. In either case, please make sure to carefully follow the next few steps.
+
+
+
+#### 1. Install Android Studio
+
+[Download and install Android Studio](https://developer.android.com/studio/index.html). Choose a "Custom" setup when prompted to select an installation type. Make sure the boxes next to all of the following are checked:
+
+
+
+* `Android SDK`
+* `Android SDK Platform`
+* `Performance (Intel ® HAXM)` ([See here for AMD](https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html))
+* `Android Virtual Device`
+
+
+
+* `Android SDK`
+* `Android SDK Platform`
+* `Android Virtual Device`
+
+
+
+Then, click "Next" to install all of these components.
+
+> If the checkboxes are grayed out, you will have a chance to install these components later on.
+
+Once setup has finalized and you're presented with the Welcome screen, proceed to the next step.
+
+#### 2. Install the Android SDK
+
+Android Studio installs the latest Android SDK by default. Building a React Native app with native code, however, requires the `Android 9 (Pie)` SDK in particular. Additional Android SDKs can be installed through the SDK Manager in Android Studio.
+
+The SDK Manager can be accessed from the "Welcome to Android Studio" screen. Click on "Configure", then select "SDK Manager".
+
+
+
+
+
+
+
+
+
+
+
+> The SDK Manager can also be found within the Android Studio "Preferences" dialog, under **Appearance & Behavior** → **System Settings** → **Android SDK**.
+
+Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the `Android 9 (Pie)` entry, then make sure the following items are checked:
+
+* `Android SDK Platform 28`
+* `Intel x86 Atom_64 System Image` or `Google APIs Intel x86 Atom System Image`
+
+Next, select the "SDK Tools" tab and check the box next to "Show Package Details" here as well. Look for and expand the "Android SDK Build-Tools" entry, then make sure that `28.0.3` is selected.
+
+Finally, click "Apply" to download and install the Android SDK and related build tools.
+
+#### 3. Configure the ANDROID_HOME environment variable
+
+The React Native tools require some environment variables to be set up in order to build apps with native code.
+
+
+
+Add the following lines to your `$HOME/.bash_profile` config file:
+
+
+
+```
+export ANDROID_HOME=$HOME/Library/Android/sdk
+export PATH=$PATH:$ANDROID_HOME/emulator
+export PATH=$PATH:$ANDROID_HOME/tools
+export PATH=$PATH:$ANDROID_HOME/tools/bin
+export PATH=$PATH:$ANDROID_HOME/platform-tools
+```
+
+
+
+```
+export ANDROID_HOME=$HOME/Android/Sdk
+export PATH=$PATH:$ANDROID_HOME/emulator
+export PATH=$PATH:$ANDROID_HOME/tools
+export PATH=$PATH:$ANDROID_HOME/tools/bin
+export PATH=$PATH:$ANDROID_HOME/platform-tools
+```
+
+
+
+> `.bash_profile` is specific to `bash`. If you're using another shell, you will need to edit the appropriate shell-specific config file.
+
+Type `source $HOME/.bash_profile` to load the config into your current shell. Verify that ANDROID_HOME has been added to your path by running `echo $PATH`.
+
+> Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Preferences" dialog, under **Appearance & Behavior** → **System Settings** → **Android SDK**.
+
+
+
+Open the System pane under **System and Security** in the Windows Control Panel, then click on **Change settings...**. Open the **Advanced** tab and click on **Environment Variables...**. Click on **New...** to create a new `ANDROID_HOME` user variable that points to the path to your Android SDK:
+
+
+
+The SDK is installed, by default, at the following location:
+
+```powershell
+c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk
+```
+
+You can find the actual location of the SDK in the Android Studio "Preferences" dialog, under **Appearance & Behavior** → **System Settings** → **Android SDK**.
+
+Open a new Command Prompt window to ensure the new environment variable is loaded before proceeding to the next step.
+
+#### 4. Add platform-tools to Path
+
+Open the System pane under **System and Security** in the Windows Control Panel, then click on **Change settings...**. Open the **Advanced** tab and click on **Environment Variables...**. Select the **Path** variable, then click **Edit**. Click **New** and add the path to platform-tools to the list.
+
+The default location for this folder is:
+
+```powershell
+c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools
+```
+
+
+
+### Watchman
+
+Follow the [Watchman installation guide](https://facebook.github.io/watchman/docs/install.html#buildinstall) to compile and install Watchman from source.
+
+> [Watchman](https://facebook.github.io/watchman/docs/install.html) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance and increased compatibility in certain edge cases (translation: you may be able to get by without installing this, but your mileage may vary; installing this now may save you from a headache later).
+
+
+
+## Creating a new application
+
+Use the React Native command line interface to generate a new React Native project called "AwesomeProject":
+
+```
+react-native init AwesomeProject
+```
+
+This is not necessary if you are integrating React Native into an existing application, if you "ejected" from Expo (or Create React Native App), or if you're adding iOS support to an existing React Native project (see [Platform Specific Code](platform-specific-code.md)). You can also use a third-party CLI to init your React Native app, such as [Ignite CLI](https://github.com/infinitered/ignite).
+
+
+
+## Creating a new application
+
+Use the React Native command line interface to generate a new React Native project called "AwesomeProject":
+
+```
+react-native init AwesomeProject
+```
+
+This is not necessary if you are integrating React Native into an existing application, if you "ejected" from Create React Native App, or if you're adding Android support to an existing React Native project (see [Platform Specific Code](platform-specific-code.md)). You can also use a third-party CLI to init your React Native app, such as [Ignite CLI](https://github.com/infinitered/ignite).
+
+
+
+## Preparing the Android device
+
+You will need an Android device to run your React Native Android app. This can be either a physical Android device, or more commonly, you can use an Android Virtual Device which allows you to emulate an Android device on your computer.
+
+Either way, you will need to prepare the device to run Android apps for development.
+
+### Using a physical device
+
+If you have a physical Android device, you can use it for development in place of an AVD by plugging it in to your computer using a USB cable and following the instructions [here](running-on-device.md).
+
+### Using a virtual device
+
+If you use Android Studio to open `./AwesomeProject/android`, you can see the list of available Android Virtual Devices (AVDs) by opening the "AVD Manager" from within Android Studio. Look for an icon that looks like this:
+
+
+
+If you have just installed Android Studio, you will likely need to [create a new AVD](https://developer.android.com/studio/run/managing-avds.html). Select "Create Virtual Device...", then pick any Phone from the list and click "Next", then select the **Pie** API Level 28 image.
+
+
+
+> We recommend configuring [VM acceleration](https://developer.android.com/studio/run/emulator-acceleration.html#vm-linux) on your system to improve performance. Once you've followed those instructions, go back to the AVD Manager.
+
+
+
+> If you don't have HAXM installed, click on "Install HAXM" or follow [these instructions](https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows) to set it up, then go back to the AVD Manager.
+
+
+
+> If you don't have HAXM installed, follow [these instructions](https://github.com/intel/haxm/wiki/Installation-Instructions-on-macOS) to set it up, then go back to the AVD Manager.
+
+
+
+Click "Next" then "Finish" to create your AVD. At this point you should be able to click on the green triangle button next to your AVD to launch it, then proceed to the next step.
+
+
+
+## Running your React Native application
+
+Run `react-native run-ios` inside your React Native project folder:
+
+```
+cd AwesomeProject
+react-native run-ios
+```
+
+You should see your new app running in the iOS Simulator shortly.
+
+
+
+`react-native run-ios` is just one way to run your app. You can also run it directly from within Xcode or [Nuclide](https://nuclide.io/).
+
+> If you can't get this to work, see the [Troubleshooting](troubleshooting.md#content) page.
+
+### Running on a device
+
+The above command will automatically run your app on the iOS Simulator by default. If you want to run the app on an actual physical iOS device, please follow the instructions [here](running-on-device.md).
+
+
+
+## Running your React Native application
+
+Run `react-native run-android` inside your React Native project folder:
+
+```
+cd AwesomeProject
+react-native run-android
+```
+
+If everything is set up correctly, you should see your new app running in your Android emulator shortly.
+
+
+
+
+
+
+
+
+
+
+
+`react-native run-android` is just one way to run your app - you can also run it directly from within Android Studio or [Nuclide](https://nuclide.io/).
+
+> If you can't get this to work, see the [Troubleshooting](troubleshooting.md#content) page.
+
+
+
+### Modifying your app
+
+Now that you have successfully run the app, let's modify it.
+
+
+
+* Open `App.js` in your text editor of choice and edit some lines.
+* Hit `⌘R` in your iOS Simulator to reload the app and see your changes!
+
+
+
+* Open `App.js` in your text editor of choice and edit some lines.
+* Press the `R` key twice or select `Reload` from the Developer Menu (`⌘M`) to see your changes!
+
+
+
+### Modifying your app
+
+Now that you have successfully run the app, let's modify it.
+
+* Open `App.js` in your text editor of choice and edit some lines.
+* Press the `R` key twice or select `Reload` from the Developer Menu (`Ctrl + M`) to see your changes!
+
+
+
+### That's it!
+
+Congratulations! You've successfully run and modified your first React Native app.
+
+
+
+
+
+### That's it!
+
+Congratulations! You've successfully run and modified your first React Native app.
+
+
+
+
+
+## Now what?
+
+* Turn on [Live Reload](debugging.md#reloading-javascript) in the Developer Menu. Your app will now reload automatically whenever you save any changes!
+
+* If you want to add this new React Native code to an existing application, check out the [Integration guide](integration-with-existing-apps.md).
+
+If you're curious to learn more about React Native, continue on to the [Tutorial](tutorial.md).
+
+
+
+## Now what?
+
+* Turn on [Live Reload](debugging.md#reloading-javascript) in the Developer Menu. Your app will now reload automatically whenever you save any changes!
+
+* If you want to add this new React Native code to an existing application, check out the [Integration guide](integration-with-existing-apps.md).
+
+If you're curious to learn more about React Native, continue on to the [Tutorial](tutorial.md).
+
+
diff --git a/docs/handling-text-input.md b/docs/handling-text-input.md
new file mode 100644
index 0000000..c9099f2
--- /dev/null
+++ b/docs/handling-text-input.md
@@ -0,0 +1,44 @@
+---
+id: handling-text-input
+title: Handling Text Input
+---
+
+[`TextInput`](textinput.md#content) is a basic component that allows the user to enter text. It has an `onChangeText` prop that takes a function to be called every time the text changed, and an `onSubmitEditing` prop that takes a function to be called when the text is submitted.
+
+For example, let's say that as the user types, you're translating their words into a different language. In this new language, every single word is written the same way: 🍕. So the sentence "Hello there Bob" would be translated as "🍕🍕🍕".
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, Text, TextInput, View } from 'react-native';
+
+export default class PizzaTranslator extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {text: ''};
+ }
+
+ render() {
+ return (
+
+ this.setState({text})}
+ />
+
+ {this.state.text.split(' ').map((word) => word && '🍕').join(' ')}
+
+
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => PizzaTranslator);
+```
+
+In this example, we store `text` in the state, because it changes over time.
+
+There are a lot more things you might want to do with a text input. For example, you could validate the text inside while the user types. For more detailed examples, see the [React docs on controlled components](https://reactjs.org/docs/forms.html#controlled-components), or the [reference docs for TextInput](textinput.md).
+
+Text input is one of the ways the user interacts with the app. Next, let's look at another type of input and [learn how to handle touches](handling-touches.md).
diff --git a/docs/handling-touches.md b/docs/handling-touches.md
new file mode 100644
index 0000000..bbc8945
--- /dev/null
+++ b/docs/handling-touches.md
@@ -0,0 +1,179 @@
+---
+id: handling-touches
+title: Handling Touches
+---
+
+Users interact with mobile apps mainly through touch. They can use a combination of gestures, such as tapping on a button, scrolling a list, or zooming on a map. React Native provides components to handle all sorts of common gestures, as well as a comprehensive [gesture responder system](gesture-responder-system.md) to allow for more advanced gesture recognition, but the one component you will most likely be interested in is the basic Button.
+
+## Displaying a basic button
+
+[Button](button.md) provides a basic button component that is rendered nicely on all platforms. The minimal example to display a button looks like this:
+
+```javascript
+ {
+ Alert.alert('You tapped the button!');
+ }}
+ title="Press Me"
+/>
+```
+
+This will render a blue label on iOS, and a blue rounded rectangle with white text on Android. Pressing the button will call the "onPress" function, which in this case displays an alert popup. If you like, you can specify a "color" prop to change the color of your button.
+
+
+
+Go ahead and play around with the `Button` component using the example below. You can select which platform your app is previewed in by clicking on the toggle in the bottom right, then click on "Tap to Play" to preview the app.
+
+```SnackPlayer name=Button%20Basics
+import React, { Component } from 'react';
+import { Alert, AppRegistry, Button, StyleSheet, View } from 'react-native';
+
+export default class ButtonBasics extends Component {
+ _onPressButton() {
+ Alert.alert('You tapped the button!')
+ }
+
+ render() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ buttonContainer: {
+ margin: 20
+ },
+ alternativeLayoutButtonContainer: {
+ margin: 20,
+ flexDirection: 'row',
+ justifyContent: 'space-between'
+ }
+});
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => ButtonBasics);
+```
+
+## Touchables
+
+If the basic button doesn't look right for your app, you can build your own button using any of the "Touchable" components provided by React Native. The "Touchable" components provide the capability to capture tapping gestures, and can display feedback when a gesture is recognized. These components do not provide any default styling, however, so you will need to do a bit of work to get them looking nicely in your app.
+
+Which "Touchable" component you use will depend on what kind of feedback you want to provide:
+
+* Generally, you can use [**TouchableHighlight**](touchablehighlight.md) anywhere you would use a button or link on web. The view's background will be darkened when the user presses down on the button.
+
+* You may consider using [**TouchableNativeFeedback**](touchablenativefeedback.md) on Android to display ink surface reaction ripples that respond to the user's touch.
+
+* [**TouchableOpacity**](touchableopacity.md) can be used to provide feedback by reducing the opacity of the button, allowing the background to be seen through while the user is pressing down.
+
+* If you need to handle a tap gesture but you don't want any feedback to be displayed, use [**TouchableWithoutFeedback**](touchablewithoutfeedback.md).
+
+In some cases, you may want to detect when a user presses and holds a view for a set amount of time. These long presses can be handled by passing a function to the `onLongPress` props of any of the "Touchable" components.
+
+Let's see all of these in action:
+
+```SnackPlayer platform=android&name=Touchables
+import React, { Component } from 'react';
+import { Alert, AppRegistry, Platform, StyleSheet, Text, TouchableHighlight, TouchableOpacity, TouchableNativeFeedback, TouchableWithoutFeedback, View } from 'react-native';
+
+export default class Touchables extends Component {
+ _onPressButton() {
+ Alert.alert('You tapped the button!')
+ }
+
+ _onLongPressButton() {
+ Alert.alert('You long-pressed the button!')
+ }
+
+
+ render() {
+ return (
+
+
+
+ TouchableHighlight
+
+
+
+
+ TouchableOpacity
+
+
+
+
+ TouchableNativeFeedback
+
+
+
+
+ TouchableWithoutFeedback
+
+
+
+
+ Touchable with Long Press
+
+
+
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ paddingTop: 60,
+ alignItems: 'center'
+ },
+ button: {
+ marginBottom: 30,
+ width: 260,
+ alignItems: 'center',
+ backgroundColor: '#2196F3'
+ },
+ buttonText: {
+ padding: 20,
+ color: 'white'
+ }
+});
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => Touchables);
+```
+
+## Scrolling lists, swiping pages, and pinch-to-zoom
+
+Another gesture commonly used in mobile apps is the swipe or pan. This gesture allows the user to scroll through a list of items, or swipe through pages of content. In order to handle these and other gestures, we'll learn [how to use a ScrollView](using-a-scrollview.md) next.
diff --git a/docs/headless-js-android.md b/docs/headless-js-android.md
new file mode 100644
index 0000000..a9318e9
--- /dev/null
+++ b/docs/headless-js-android.md
@@ -0,0 +1,145 @@
+---
+id: headless-js-android
+title: Headless JS
+---
+
+Headless JS is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music.
+
+## The JS API
+
+A task is a simple async function that you register on `AppRegistry`, similar to registering React applications:
+
+```javascript
+AppRegistry.registerHeadlessTask('SomeTaskName', () => require('SomeTaskName'));
+```
+
+Then, in `SomeTaskName.js`:
+
+```javascript
+module.exports = async (taskData) => {
+ // do stuff
+};
+```
+
+You can do anything in your task such as network requests, timers and so on, as long as it doesn't touch UI. Once your task completes (i.e. the promise is resolved), React Native will go into "paused" mode (unless there are other tasks running, or there is a foreground app).
+
+## The Java API
+
+Yes, this does still require some native code, but it's pretty thin. You need to extend `HeadlessJsTaskService` and override `getTaskConfig`, e.g.:
+
+```java
+public class MyTaskService extends HeadlessJsTaskService {
+
+ @Override
+ protected @Nullable HeadlessJsTaskConfig getTaskConfig(Intent intent) {
+ Bundle extras = intent.getExtras();
+ if (extras != null) {
+ return new HeadlessJsTaskConfig(
+ "SomeTaskName",
+ Arguments.fromBundle(extras),
+ 5000, // timeout for the task
+ false // optional: defines whether or not the task is allowed in foreground. Default is false
+ );
+ }
+ return null;
+ }
+}
+```
+
+Then add the service to your `AndroidManifest.xml` file:
+
+```
+
+```
+
+Now, whenever you [start your service][0], e.g. as a periodic task or in response to some system event / broadcast, JS will spin up, run your task, then spin down.
+
+Example:
+
+```java
+Intent service = new Intent(getApplicationContext(), MyTaskService.class);
+Bundle bundle = new Bundle();
+
+bundle.putString("foo", "bar");
+service.putExtras(bundle);
+
+getApplicationContext().startService(service);
+```
+
+## Caveats
+
+* By default, your app will crash if you try to run a task while the app is in the foreground. This is to prevent developers from shooting themselves in the foot by doing a lot of work in a task and slowing the UI. You can pass a fourth `boolean` argument to control this behaviour.
+* If you start your service from a `BroadcastReceiver`, make sure to call `HeadlessJsTaskService.acquireWakeLockNow()` before returning from `onReceive()`.
+
+## Example Usage
+
+Service can be started from Java API. First you need to decide when the service should be started and implement your solution accordingly. Here is a simple example that reacts to network connection change.
+
+Following lines shows part of Android manifest file for registering broadcast receiver.
+
+```xml
+
+
+
+
+
+```
+
+Broadcast receiver then handles intent that was broadcasted in onReceive function. This is a great place to check whether your app is on foreground or not. If app is not on foreground we can prepare our intent to be started, with no information or additional information bundled using `putExtra` (keep in mind bundle can handle only parcelable values). In the end service is started and wakelock is acquired.
+
+```java
+public class NetworkChangeReceiver extends BroadcastReceiver {
+
+ @Override
+ public void onReceive(final Context context, final Intent intent) {
+ /**
+ This part will be called everytime network connection is changed
+ e.g. Connected -> Not Connected
+ **/
+ if (!isAppOnForeground((context))) {
+ /**
+ We will start our service and send extra info about
+ network connections
+ **/
+ boolean hasInternet = isNetworkAvailable(context);
+ Intent serviceIntent = new Intent(context, MyTaskService.class);
+ serviceIntent.putExtra("hasInternet", hasInternet);
+ context.startService(serviceIntent);
+ HeadlessJsTaskService.acquireWakeLockNow(context);
+ }
+ }
+
+ private boolean isAppOnForeground(Context context) {
+ /**
+ We need to check if app is in foreground otherwise the app will crash.
+ http://stackoverflow.com/questions/8489993/check-android-application-is-in-foreground-or-not
+ **/
+ ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+ List appProcesses =
+ activityManager.getRunningAppProcesses();
+ if (appProcesses == null) {
+ return false;
+ }
+ final String packageName = context.getPackageName();
+ for (ActivityManager.RunningAppProcessInfo appProcess : appProcesses) {
+ if (appProcess.importance ==
+ ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND &&
+ appProcess.processName.equals(packageName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static boolean isNetworkAvailable(Context context) {
+ ConnectivityManager cm = (ConnectivityManager)
+ context.getSystemService(Context.CONNECTIVITY_SERVICE);
+ NetworkInfo netInfo = cm.getActiveNetworkInfo();
+ return (netInfo != null && netInfo.isConnected());
+ }
+
+
+}
+```
+
+[0]: https://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent)
diff --git a/docs/height-and-width.md b/docs/height-and-width.md
new file mode 100644
index 0000000..e14899e
--- /dev/null
+++ b/docs/height-and-width.md
@@ -0,0 +1,63 @@
+---
+id: height-and-width
+title: Height and Width
+---
+
+A component's height and width determine its size on the screen.
+
+## Fixed Dimensions
+
+The simplest way to set the dimensions of a component is by adding a fixed `width` and `height` to style. All dimensions in React Native are unitless, and represent density-independent pixels.
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, View } from 'react-native';
+
+export default class FixedDimensionsBasics extends Component {
+ render() {
+ return (
+
+
+
+
+
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => FixedDimensionsBasics);
+```
+
+Setting dimensions this way is common for components that should always render at exactly the same size, regardless of screen dimensions.
+
+## Flex Dimensions
+
+Use `flex` in a component's style to have the component expand and shrink dynamically based on available space. Normally you will use `flex: 1`, which tells a component to fill all available space, shared evenly amongst other components with the same parent. The larger the `flex` given, the higher the ratio of space a component will take compared to its siblings.
+
+> A component can only expand to fill available space if its parent has dimensions greater than 0. If a parent does not have either a fixed `width` and `height` or `flex`, the parent will have dimensions of 0 and the `flex` children will not be visible.
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, View } from 'react-native';
+
+export default class FlexDimensionsBasics extends Component {
+ render() {
+ return (
+ // Try removing the `flex: 1` on the parent View.
+ // The parent will not have dimensions, so the children can't expand.
+ // What if you add `height: 300` instead of `flex: 1`?
+
+
+
+
+
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => FlexDimensionsBasics);
+```
+
+After you can control a component's size, the next step is to [learn how to lay it out on the screen](flexbox.md).
diff --git a/docs/image-style-props.md b/docs/image-style-props.md
new file mode 100644
index 0000000..081d63f
--- /dev/null
+++ b/docs/image-style-props.md
@@ -0,0 +1,148 @@
+---
+id: image-style-props
+title: Image Style Props
+---
+
+### Props
+
+* [`borderTopRightRadius`](image-style-props.md#bordertoprightradius)
+* [`backfaceVisibility`](image-style-props.md#backfacevisibility)
+* [`borderBottomLeftRadius`](image-style-props.md#borderbottomleftradius)
+* [`borderBottomRightRadius`](image-style-props.md#borderbottomrightradius)
+* [`borderColor`](image-style-props.md#bordercolor)
+* [`borderRadius`](image-style-props.md#borderradius)
+* [`borderTopLeftRadius`](image-style-props.md#bordertopleftradius)
+* [`backgroundColor`](image-style-props.md#backgroundcolor)
+* [`borderWidth`](image-style-props.md#borderwidth)
+* [`opacity`](image-style-props.md#opacity)
+* [`overflow`](image-style-props.md#overflow)
+* [`resizeMode`](image-style-props.md#resizemode)
+* [`tintColor`](image-style-props.md#tintcolor)
+* [`overlayColor`](image-style-props.md#overlaycolor)
+
+---
+
+# Reference
+
+## Props
+
+### `borderTopRightRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `backfaceVisibility`
+
+| Type | Required |
+| ------------------------- | -------- |
+| enum('visible', 'hidden') | No |
+
+---
+
+### `borderBottomLeftRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderBottomRightRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `borderRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderTopLeftRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `backgroundColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `borderWidth`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `opacity`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `overflow`
+
+| Type | Required |
+| ------------------------- | -------- |
+| enum('visible', 'hidden') | No |
+
+---
+
+### `resizeMode`
+
+| Type | Required |
+| ------------------------------------------------------- | -------- |
+| enum('cover', 'contain', 'stretch', 'repeat', 'center') | No |
+
+---
+
+### `tintColor`
+
+Changes the color of all the non-transparent pixels to the tintColor.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `overlayColor`
+
+When the image has rounded corners, specifying an overlayColor will cause the remaining space in the corners to be filled with a solid color. This is useful in cases which are not supported by the Android implementation of rounded corners:
+
+* Certain resize modes, such as 'contain'
+* Animated GIFs
+
+A typical way to use this prop is with images displayed on a solid background and setting the `overlayColor` to the same color as the background.
+
+For details of how this works under the hood, see https://frescolib.org/docs/rounded-corners-and-circles.html
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| string | No | Android |
diff --git a/docs/image.md b/docs/image.md
new file mode 100644
index 0000000..86e697f
--- /dev/null
+++ b/docs/image.md
@@ -0,0 +1,501 @@
+---
+id: image
+title: Image
+---
+
+A React component for displaying different types of images, including network images, static resources, temporary local images, and images from local disk, such as the camera roll.
+
+This example shows fetching and displaying an image from local storage as well as one from network and even from data provided in the `'data:'` uri scheme.
+
+> Note that for network and data images, you will need to manually specify the dimensions of your image!
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, View, Image } from 'react-native';
+
+export default class DisplayAnImage extends Component {
+ render() {
+ return (
+
+
+
+
+
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('DisplayAnImage', () => DisplayAnImage);
+```
+
+You can also add `style` to an image:
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, View, Image, StyleSheet } from 'react-native';
+
+const styles = StyleSheet.create({
+ stretch: {
+ width: 50,
+ height: 200
+ }
+});
+
+export default class DisplayAnImageWithStyle extends Component {
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+// skip these lines if using Create React Native App
+AppRegistry.registerComponent(
+ 'DisplayAnImageWithStyle',
+ () => DisplayAnImageWithStyle
+);
+```
+
+### GIF and WebP support on Android
+
+When building your own native code, GIF and WebP are not supported by default on Android.
+
+You will need to add some optional modules in `android/app/build.gradle`, depending on the needs of your app.
+
+```gradle
+dependencies {
+ // If your app supports Android versions before Ice Cream Sandwich (API level 14)
+ compile 'com.facebook.fresco:animated-base-support:1.10.0'
+
+ // For animated GIF support
+ compile 'com.facebook.fresco:animated-gif:1.10.0'
+
+ // For WebP support, including animated WebP
+ compile 'com.facebook.fresco:animated-webp:1.10.0'
+ compile 'com.facebook.fresco:webpsupport:1.10.0'
+
+ // For WebP support, without animations
+ compile 'com.facebook.fresco:webpsupport:1.10.0'
+}
+```
+
+### Props
+
+* [`style`](image.md#style)
+* [`blurRadius`](image.md#blurradius)
+* [`onLayout`](image.md#onlayout)
+* [`onLoad`](image.md#onload)
+* [`onLoadEnd`](image.md#onloadend)
+* [`onLoadStart`](image.md#onloadstart)
+* [`resizeMode`](image.md#resizemode)
+* [`source`](image.md#source)
+* [`loadingIndicatorSource`](image.md#loadingindicatorsource)
+* [`onError`](image.md#onerror)
+* [`testID`](image.md#testid)
+* [`resizeMethod`](image.md#resizemethod)
+* [`accessibilityLabel`](image.md#accessibilitylabel)
+* [`accessible`](image.md#accessible)
+* [`capInsets`](image.md#capinsets)
+* [`defaultSource`](image.md#defaultsource)
+* [`onPartialLoad`](image.md#onpartialload)
+* [`onProgress`](image.md#onprogress)
+* [`fadeDuration`](image.md#fadeduration)
+* [`progressiveRenderingEnabled`](image.md#progressiverenderingenabled)
+
+### Methods
+
+* [`getSize`](image.md#getsize)
+* [`prefetch`](image.md#prefetch)
+* [`abortPrefetch`](image.md#abortprefetch)
+* [`queryCache`](image.md#querycache)
+* [`resolveAssetSource`](image.md#resolveassetsource)
+
+---
+
+# Reference
+
+## Props
+
+### `style`
+
+`ImageResizeMode` is an `Enum` for different image resizing modes, set via the `resizeMode` style property on `Image` components. The values are `contain`, `cover`, `stretch`, `center`, `repeat`.
+
+| Type | Required |
+| ----- | -------- |
+| style | No |
+
+* [Layout Props...](layout-props.md#props)
+
+* [Shadow Props...](shadow-props.md#props)
+
+* [Transforms...](transforms.md#props)
+
+* **`borderTopRightRadius`**: number
+
+* **`backfaceVisibility`**: enum('visible', 'hidden')
+
+* **`borderBottomLeftRadius`**: number
+
+* **`borderBottomRightRadius`**: number
+
+* **`borderColor`**: [color](colors.md)
+
+* **`borderRadius`**: number
+
+* **`borderTopLeftRadius`**: number
+
+* **`backgroundColor`**: [color](colors.md)
+
+* **`borderWidth`**: number
+
+* **`opacity`**: number
+
+* **`overflow`**: enum('visible', 'hidden')
+
+* **`resizeMode`**: Object.keys(ImageResizeMode)
+
+* **`tintColor`**: [color](colors.md)
+
+ Changes the color of all the non-transparent pixels to the tintColor.
+
+* **`overlayColor`**: string (_Android_)
+
+ When the image has rounded corners, specifying an overlayColor will cause the remaining space in the corners to be filled with a solid color. This is useful in cases which are not supported by the Android implementation of rounded corners:
+
+ * Certain resize modes, such as 'contain'
+ * Animated GIFs
+
+ A typical way to use this prop is with images displayed on a solid background and setting the `overlayColor` to the same color as the background.
+
+ For details of how this works under the hood, see http://frescolib.org/docs/rounded-corners-and-circles.html
+
+---
+
+### `blurRadius`
+
+blurRadius: the blur radius of the blur filter added to the image
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `onLayout`
+
+Invoked on mount and layout changes with `{nativeEvent: {layout: {x, y, width, height}}}`.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLoad`
+
+Invoked when load completes successfully.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLoadEnd`
+
+Invoked when load either succeeds or fails.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLoadStart`
+
+Invoked on load start.
+
+e.g., `onLoadStart={(e) => this.setState({loading: true})}`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `resizeMode`
+
+Determines how to resize the image when the frame doesn't match the raw image dimensions.
+
+* `cover`: Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).
+
+* `contain`: Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
+
+* `stretch`: Scale width and height independently, This may change the aspect ratio of the src.
+
+* `repeat`: Repeat the image to cover the frame of the view. The image will keep its size and aspect ratio, unless it is larger than the view, in which case it will be scaled down uniformly so that it is contained in the view.
+
+* `center`: Center the image in the view along both dimensions. If the image is larger than the view, scale it down uniformly so that it is contained in the view.
+
+| Type | Required |
+| ------------------------------------------------------- | -------- |
+| enum('cover', 'contain', 'stretch', 'repeat', 'center') | No |
+
+---
+
+### `source`
+
+The image source (either a remote URL or a local file resource).
+
+This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best `uri` to display based on the measured size of the image container. A `cache` property can be added to control how networked request interacts with the local cache.
+
+The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`, `webp` (Android only), `psd` (iOS only).
+
+| Type | Required |
+| ------------------- | -------- |
+| ImageSourcePropType | No |
+
+---
+
+### `loadingIndicatorSource`
+
+Similarly to `source`, this property represents the resource used to render the loading indicator for the image, displayed until image is ready to be displayed, typically after when it got downloaded from network.
+
+| Type | Required |
+| ------------------------------------- | -------- |
+| array of ImageSourcePropTypes, number | No |
+
+> Can accept a number as returned by `require('./image.jpg')`
+
+---
+
+### `onError`
+
+Invoked on load error with `{nativeEvent: {error}}`.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `testID`
+
+A unique identifier for this element to be used in UI Automation testing scripts.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `resizeMethod`
+
+The mechanism that should be used to resize the image when the image's dimensions differ from the image view's dimensions. Defaults to `auto`.
+
+* `auto`: Use heuristics to pick between `resize` and `scale`.
+
+* `resize`: A software operation which changes the encoded image in memory before it gets decoded. This should be used instead of `scale` when the image is much larger than the view.
+
+* `scale`: The image gets drawn downscaled or upscaled. Compared to `resize`, `scale` is faster (usually hardware accelerated) and produces higher quality images. This should be used if the image is smaller than the view. It should also be used if the image is slightly bigger than the view.
+
+More details about `resize` and `scale` can be found at http://frescolib.org/docs/resizing.html.
+
+| Type | Required | Platform |
+| ------------------------------- | -------- | -------- |
+| enum('auto', 'resize', 'scale') | No | Android |
+
+---
+
+### `accessibilityLabel`
+
+The text that's read by the screen reader when the user interacts with the image.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| node | No | iOS |
+
+---
+
+### `accessible`
+
+When true, indicates the image is an accessibility element.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `capInsets`
+
+When the image is resized, the corners of the size specified by `capInsets` will stay a fixed size, but the center content and borders of the image will be stretched. This is useful for creating resizable rounded buttons, shadows, and other resizable assets. More info in the [official Apple documentation](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/index.html#//apple_ref/occ/instm/UIImage/resizableImageWithCapInsets).
+
+| Type | Required | Platform |
+| ------------------------------------------------------------------ | -------- | -------- |
+| object: {top: number, left: number, bottom: number, right: number} | No | iOS |
+
+---
+
+### `defaultSource`
+
+A static image to display while loading the image source.
+
+| Type | Required | Platform |
+| -------------- | -------- | -------- |
+| object, number | No | iOS |
+| number | No | Android |
+
+If passing an object, the general shape is `{uri: string, width: number, height: number, scale: number}`:
+
+* `uri` - a string representing the resource identifier for the image, which should be either a local file path or the name of a static image resource (which should be wrapped in the `require('./path/to/image.png')` function).
+* `width`, `height` - can be specified if known at build time, in which case these will be used to set the default `` component dimensions.
+* `scale` - used to indicate the scale factor of the image. Defaults to 1.0 if unspecified, meaning that one image pixel equates to one display point / DIP.
+
+If passing a number:
+
+* `number` - Opaque type returned by something like `require('./image.jpg')`.
+
+> **Note:** On Android, the default source prop is ignored on debug builds.
+
+---
+
+### `onPartialLoad`
+
+Invoked when a partial load of the image is complete. The definition of what constitutes a "partial load" is loader specific though this is meant for progressive JPEG loads.
+
+| Type | Required | Platform |
+| -------- | -------- | -------- |
+| function | No | iOS |
+
+---
+
+### `onProgress`
+
+Invoked on download progress with `{nativeEvent: {loaded, total}}`.
+
+| Type | Required | Platform |
+| -------- | -------- | -------- |
+| function | No | iOS |
+
+---
+
+### `fadeDuration`
+
+Android only. By default, it is 300ms.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | Android |
+
+---
+
+### `progressiveRenderingEnabled`
+
+Android only. When true, enables progressive jpeg streaming. https://frescolib.org/docs/progressive-jpegs.html
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+## Methods
+
+### `getSize()`
+
+```javascript
+Image.getSize(uri, success, [failure]);
+```
+
+Retrieve the width and height (in pixels) of an image prior to displaying it. This method can fail if the image cannot be found, or fails to download.
+
+In order to retrieve the image dimensions, the image may first need to be loaded or downloaded, after which it will be cached. This means that in principle you could use this method to preload images, however it is not optimized for that purpose, and may in future be implemented in a way that does not fully load/download the image data. A proper, supported way to preload images will be provided as a separate API.
+
+Does not work for static image resources.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | -------- | -------- | ---------------------------------------------------------------------------------------------------- |
+| uri | string | Yes | The location of the image. |
+| success | function | Yes | The function that will be called if the image was successfully found and width and height retrieved. |
+| failure | function | No | The function that will be called if there was an error, such as failing to retrieve the image. |
+
+---
+
+### `prefetch()`
+
+```javascript
+Image.prefetch(url);
+```
+
+Prefetches a remote image for later use by downloading it to the disk cache
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ------ | -------- | --------------------------------- |
+| url | string | Yes | The remote location of the image. |
+
+---
+
+### `abortPrefetch()`
+
+```javascript
+Image.abortPrefetch(requestId);
+```
+
+Abort prefetch request. Android-only.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| --------- | ------ | -------- | ---------------------------- |
+| requestId | number | Yes | Id as returned by prefetch() |
+
+---
+
+### `queryCache()`
+
+```javascript
+Image.queryCache(urls);
+```
+
+Perform cache interrogation. Returns a mapping from URL to cache status, such as "disk" or "memory". If a requested URL is not in the mapping, it means it's not in the cache.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ----- | -------- | ------------------------------------------ |
+| urls | array | Yes | List of image URLs to check the cache for. |
+
+---
+
+### `resolveAssetSource()`
+
+```javascript
+Image.resolveAssetSource(source);
+```
+
+Resolves an asset reference into an object which has the properties `uri`, `width`, and `height`.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | -------------- | -------- | ---------------------------------------------------------------------------- |
+| source | number, object | Yes | A number (opaque type returned by require('./foo.png')) or an `ImageSource`. |
+
+> `ImageSource` is an object like `{ uri: '' }`
diff --git a/docs/imagebackground.md b/docs/imagebackground.md
new file mode 100644
index 0000000..ec67494
--- /dev/null
+++ b/docs/imagebackground.md
@@ -0,0 +1,53 @@
+---
+id: imagebackground
+title: ImageBackground
+---
+
+A common feature request from developers familiar with the web is `background-image`. To handle this use case, you can use the `` component, which has the same props as ``, and add whatever children to it you would like to layer on top of it.
+
+You might not want to use `` in some cases, since the implementation is very simple. Refer to ``'s [source code](https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageBackground.js) for more insight, and create your own custom component when needed.
+
+Note that you must specify some width and height style attributes.
+
+## Example
+
+```javascript
+return (
+
+ Inside
+
+);
+```
+
+### Props
+
+* [`Image` props...](image.md#props)
+* [`style`](imagebackground.md#style)
+* [`imageStyle`](imagebackground.md#imageStyle)
+* [`imageRef`](imagebackground.md#imageRef)
+
+---
+
+# Reference
+
+## Props
+
+### `style`
+
+| Type | Required |
+| ---------------------------------- | -------- |
+| [view styles](view-style-props.md) | No |
+
+### `imageStyle`
+
+| Type | Required |
+| ------------------------------------ | -------- |
+| [image styles](image-style-props.md) | No |
+
+### `imageRef`
+
+Allows to set a reference to the inner `Image` component
+
+| Type | Required |
+| ----------------------------------------------------- | -------- |
+| [Ref](https://reactjs.org/docs/refs-and-the-dom.html) | No |
diff --git a/docs/imageeditor.md b/docs/imageeditor.md
new file mode 100644
index 0000000..a50ae41
--- /dev/null
+++ b/docs/imageeditor.md
@@ -0,0 +1,40 @@
+---
+id: imageeditor
+title: ImageEditor
+---
+
+### Methods
+
+* [`cropImage`](imageeditor.md#cropimage)
+
+---
+
+# Reference
+
+## Methods
+
+### `cropImage()`
+
+```javascript
+static cropImage(uri, cropData, success, failure)
+```
+
+Crop the image specified by the URI param. If URI points to a remote image, it will be downloaded automatically. If the image cannot be loaded/downloaded, the `failure` callback will be called.
+
+If the cropping process is successful, the resultant cropped image will be stored in the ImageStore, and the URI returned in the `success` callback will point to the image in the store. Remember to delete the cropped image from the ImageStore when you are done with it.
+
+### cropData
+
+* `offset` - The top-left corner of the cropped image, specified in the original image's coordinate space
+* `size` - Size (dimensions) of the cropped image
+* `displaySize (optional)` - Size to which you want to scale the cropped image
+* `resizeMode (optional)` - Resizing mode to use when scaling the image
+
+```javascript
+cropData = {
+ offset: {x: number, y: number},
+ size: {width: number, height: number},
+ displaySize: {width: number, height: number},
+ resizeMode: 'contain/cover/stretch',
+};
+```
diff --git a/docs/imagepickerios.md b/docs/imagepickerios.md
new file mode 100644
index 0000000..c0c5a70
--- /dev/null
+++ b/docs/imagepickerios.md
@@ -0,0 +1,47 @@
+---
+id: imagepickerios
+title: ImagePickerIOS
+---
+
+### Methods
+
+* [`canRecordVideos`](imagepickerios.md#canrecordvideos)
+* [`canUseCamera`](imagepickerios.md#canusecamera)
+* [`openCameraDialog`](imagepickerios.md#opencameradialog)
+* [`openSelectDialog`](imagepickerios.md#openselectdialog)
+
+---
+
+# Reference
+
+## Methods
+
+### `canRecordVideos()`
+
+```javascript
+static canRecordVideos(callback)
+```
+
+---
+
+### `canUseCamera()`
+
+```javascript
+static canUseCamera(callback)
+```
+
+---
+
+### `openCameraDialog()`
+
+```javascript
+static openCameraDialog(config, successCallback, cancelCallback)
+```
+
+---
+
+### `openSelectDialog()`
+
+```javascript
+static openSelectDialog(config, successCallback, cancelCallback)
+```
diff --git a/docs/imagestore.md b/docs/imagestore.md
new file mode 100644
index 0000000..a4d8b87
--- /dev/null
+++ b/docs/imagestore.md
@@ -0,0 +1,59 @@
+---
+id: imagestore
+title: ImageStore
+---
+
+### Methods
+
+* [`hasImageForTag`](imagestore.md#hasimagefortag)
+* [`removeImageForTag`](imagestore.md#removeimagefortag)
+* [`addImageFromBase64`](imagestore.md#addimagefrombase64)
+* [`getBase64ForTag`](imagestore.md#getbase64fortag)
+
+---
+
+# Reference
+
+## Methods
+
+### `hasImageForTag()`
+
+```javascript
+static hasImageForTag(uri, callback)
+```
+
+Check if the ImageStore contains image data for the specified URI. @platform ios
+
+---
+
+### `removeImageForTag()`
+
+```javascript
+static removeImageForTag(uri)
+```
+
+Delete an image from the ImageStore. Images are stored in memory and must be manually removed when you are finished with them, otherwise they will continue to use up RAM until the app is terminated. It is safe to call `removeImageForTag()` without first calling `hasImageForTag()`, it will simply fail silently. @platform ios
+
+---
+
+### `addImageFromBase64()`
+
+```javascript
+static addImageFromBase64(base64ImageData, success, failure)
+```
+
+Stores a base64-encoded image in the ImageStore, and returns a URI that can be used to access or display the image later. Images are stored in memory only, and must be manually deleted when you are finished with them by calling `removeImageForTag()`.
+
+Note that it is very inefficient to transfer large quantities of binary data between JS and native code, so you should avoid calling this more than necessary. @platform ios
+
+---
+
+### `getBase64ForTag()`
+
+```javascript
+static getBase64ForTag(uri, success, failure)
+```
+
+Retrieves the base64-encoded data for an image in the ImageStore. If the specified URI does not match an image in the store, the failure callback will be called.
+
+Note that it is very inefficient to transfer large quantities of binary data between JS and native code, so you should avoid calling this more than necessary. To display an image in the ImageStore, you can just pass the URI to an `` component; there is no need to retrieve the base64 data.
diff --git a/docs/improvingux.md b/docs/improvingux.md
new file mode 100644
index 0000000..bdda1d1
--- /dev/null
+++ b/docs/improvingux.md
@@ -0,0 +1,54 @@
+---
+id: improvingux
+title: Improving User Experience
+---
+
+## Configure text inputs
+
+Entering text on touch phone is a challenge - small screen, software keyboard. But based on what kind of data you need, you can make it easier by properly configuring the text inputs:
+
+* Focus the first field automatically
+* Use placeholder text as an example of expected data format
+* Enable or disable autocapitalization and autocorrect
+* Choose keyboard type (e.g. email, numeric)
+* Make sure the return button focuses the next field or submits the form
+
+Check out [`TextInput` docs](textinput.md) for more configuration options.
+
+
+
+[Try it on your phone](https://snack.expo.io/H1iGt2vSW)
+
+## Manage layout when keyboard is visible
+
+Software keyboard takes almost half of the screen. If you have interactive elements that can get covered by the keyboard, make sure they are still accessible by using the [`KeyboardAvoidingView` component](keyboardavoidingview.md).
+
+
+
+[Try it on your phone](https://snack.expo.io/ryxRkwnrW)
+
+## Make tappable areas larger
+
+On mobile phones it's hard to be very precise when pressing buttons. Make sure all interactive elements are 44x44 or larger. One way to do this is to leave enough space for the element, `padding`, `minWidth` and `minHeight` style values can be useful for that. Alternatively, you can use [`hitSlop` prop](touchablewithoutfeedback.md#hitslop) to increase interactive area without affecting the layout. Here's a demo:
+
+
+
+[Try it on your phone](https://snack.expo.io/rJPwCt4HZ)
+
+## Use Android Ripple
+
+Android API 21+ uses the material design ripple to provide user with feedback when they touch an interactable area on the screen. React Native exposes this through the [`TouchableNativeFeedback` component](touchablenativefeedback.md). Using this touchable effect instead of opacity or highlight will often make your app feel much more fitting on the platform. That said, you need to be careful when using it because it doesn't work on iOS or on Android API < 21, so you will need to fallback to using one of the other Touchable components on iOS. You can use a library like [react-native-platform-touchable](https://github.com/react-community/react-native-platform-touchable) to handle the platform differences for you.
+
+
+
+[Try it on your phone](https://snack.expo.io/SJywqe3rZ)
+
+## Screen orientation lock
+
+Multiple screen orientations should work fine by default unless you're using `Dimensions` API and don't handle orientation changes. If you don't want to support multiple screen orientations, you can lock the screen orientation to either portrait or landscape.
+
+On iOS, in the General tab and Deployment Info section of Xcode enable the Device Orientation you want to support (ensure you have selected iPhone from the Devices menu when making the changes). For Android, open the AndroidManifest.xml file and within the activity element add `'android:screenOrientation="portrait"'` to lock to portrait or `'android:screenOrientation="landscape"'` to lock to landscape.
+
+# Learn more
+
+[Material Design](https://material.io/) and [Human Interface Guidelines](https://developer.apple.com/ios/human-interface-guidelines/overview/design-principles/) are great resources for learning more about designing for mobile platforms.
diff --git a/docs/inputaccessoryview.md b/docs/inputaccessoryview.md
new file mode 100644
index 0000000..34a052a
--- /dev/null
+++ b/docs/inputaccessoryview.md
@@ -0,0 +1,91 @@
+---
+id: inputaccessoryview
+title: InputAccessoryView
+---
+
+A component which enables customization of the keyboard input accessory view on iOS. The input accessory view is displayed above the keyboard whenever a `TextInput` has focus. This component can be used to create custom toolbars.
+
+To use this component wrap your custom toolbar with the InputAccessoryView component, and set a `nativeID`. Then, pass that `nativeID` as the `inputAccessoryViewID` of whatever `TextInput` you desire. A simple example:
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { View, ScrollView, AppRegistry, TextInput, InputAccessoryView, Button } from 'react-native';
+
+export default class UselessTextInput extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {text: 'Placeholder Text'};
+ }
+
+ render() {
+ const inputAccessoryViewID = "uniqueID";
+ return (
+
+
+ this.setState({text})}
+ value={this.state.text}
+ />
+
+
+ this.setState({text: 'Placeholder Text'})}
+ title="Reset Text"
+ />
+
+
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => UselessTextInput);
+```
+
+This component can also be used to create sticky text inputs (text inputs which are anchored to the top of the keyboard). To do this, wrap a `TextInput` with the `InputAccessoryView` component, and don't set a `nativeID`. For an example, look at [InputAccessoryViewExample.js](https://github.com/facebook/react-native/blob/master/RNTester/js/InputAccessoryViewExample.js).
+
+### Props
+
+* [`backgroundColor`](inputaccessoryview.md#backgroundcolor)
+* [`nativeID`](inputaccessoryview.md#nativeid)
+* [`style`](inputaccessoryview.md#style)
+
+---
+
+# Reference
+
+## Props
+
+### `backgroundColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `nativeID`
+
+An ID which is used to associate this `InputAccessoryView` to specified TextInput(s).
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `style`
+
+| Type | Required |
+| ---------------------------- | -------- |
+| [style](view-style-props.md) | No |
+
+# Known issues
+
+* [react-native#18997](https://github.com/facebook/react-native/issues/18997): Doesn't support multiline `TextInput`s
+* [react-native#20157](https://github.com/facebook/react-native/issues/20157): Can't use with a bottom tab bar
diff --git a/docs/integration-with-existing-apps.md b/docs/integration-with-existing-apps.md
new file mode 100644
index 0000000..ab33c4b
--- /dev/null
+++ b/docs/integration-with-existing-apps.md
@@ -0,0 +1,1005 @@
+---
+id: integration-with-existing-apps
+title: Integration with Existing Apps
+---
+
+
+
+React Native is great when you are starting a new mobile app from scratch. However, it also works well for adding a single view or user flow to existing native applications. With a few steps, you can add new React Native based features, screens, views, etc.
+
+The specific steps are different depending on what platform you're targeting.
+
+
+
+
+ iOS (Objective-C)
+
+
+ iOS (Swift)
+
+
+ Android (Java)
+
+
+
+
+
+
+## Key Concepts
+
+
+
+The keys to integrating React Native components into your iOS application are to:
+
+1. Set up React Native dependencies and directory structure.
+2. Understand what React Native components you will use in your app.
+3. Add these components as dependencies using CocoaPods.
+4. Develop your React Native components in JavaScript.
+5. Add a `RCTRootView` to your iOS app. This view will serve as the container for your React Native component.
+6. Start the React Native server and run your native application.
+7. Verify that the React Native aspect of your application works as expected.
+
+
+
+The keys to integrating React Native components into your Android application are to:
+
+1. Set up React Native dependencies and directory structure.
+2. Develop your React Native components in JavaScript.
+3. Add a `ReactRootView` to your Android app. This view will serve as the container for your React Native component.
+4. Start the React Native server and run your native application.
+5. Verify that the React Native aspect of your application works as expected.
+
+
+
+## Prerequisites
+
+
+
+Follow the instructions for building apps with native code from the [Getting Started guide](getting-started.md) to configure your development environment for building React Native apps for iOS.
+
+### 1. Set up directory structure
+
+To ensure a smooth experience, create a new folder for your integrated React Native project, then copy your existing iOS project to a `/ios` subfolder.
+
+
+
+Follow the instructions for building apps with native code from the [Getting Started guide](getting-started.md) to configure your development environment for building React Native apps for Android.
+
+### 1. Set up directory structure
+
+To ensure a smooth experience, create a new folder for your integrated React Native project, then copy your existing Android project to an `/android` subfolder.
+
+
+
+### 2. Install JavaScript dependencies
+
+Go to the root directory for your project and create a new `package.json` file with the following contents:
+
+```
+{
+ "name": "MyReactNativeApp",
+ "version": "0.0.1",
+ "private": true,
+ "scripts": {
+ "start": "node node_modules/react-native/local-cli/cli.js start"
+ }
+}
+```
+
+Next, make sure you have [installed the yarn package manager](https://yarnpkg.com/lang/en/docs/install/).
+
+Install the `react` and `react-native` packages. Open a terminal or command prompt, then navigate to the directory with your `package.json` file and run:
+
+```
+$ yarn add react-native
+```
+
+This will print a message similar to the following (scroll up in the yarn output to see it):
+
+> warning "react-native@0.52.2" has unmet peer dependency "react@16.2.0".
+
+This is OK, it means we also need to install React:
+
+```
+$ yarn add react@version_printed_above
+```
+
+Yarn has created a new `/node_modules` folder. This folder stores all the JavaScript dependencies required to build your project.
+
+Add `node_modules/` to your `.gitignore` file.
+
+
+
+### 3. Install CocoaPods
+
+[CocoaPods](http://cocoapods.org) is a package management tool for iOS and macOS development. We use it to add the actual React Native framework code locally into your current project.
+
+We recommend installing CocoaPods using [Homebrew](http://brew.sh/).
+
+```
+$ brew install cocoapods
+```
+
+> It is technically possible not to use CocoaPods, but that would require manual library and linker additions that would overly complicate this process.
+
+
+
+## Adding React Native to your app
+
+
+
+Assume the [app for integration](https://github.com/JoelMarcey/iOS-2048) is a [2048](https://en.wikipedia.org/wiki/2048_%28video_game%29) game. Here is what the main menu of the native application looks like without React Native.
+
+
+
+Assume the [app for integration](https://github.com/JoelMarcey/swift-2048) is a [2048](https://en.wikipedia.org/wiki/2048_%28video_game%29) game. Here is what the main menu of the native application looks like without React Native.
+
+
+
+
+
+### Command Line Tools for Xcode
+
+Install the Command Line Tools. Choose "Preferences..." in the Xcode menu. Go to the Locations panel and install the tools by selecting the most recent version in the Command Line Tools dropdown.
+
+
+
+### Configuring CocoaPods dependencies
+
+Before you integrate React Native into your application, you will want to decide what parts of the React Native framework you would like to integrate. We will use CocoaPods to specify which of these "subspecs" your app will depend on.
+
+The list of supported `subspec`s is available in [`/node_modules/react-native/React.podspec`](https://github.com/facebook/react-native/blob/master/React.podspec). They are generally named by functionality. For example, you will generally always want the `Core` `subspec`. That will get you the `AppRegistry`, `StyleSheet`, `View` and other core React Native libraries. If you want to add the React Native `Text` library (e.g., for `` elements), then you will need the `RCTText` `subspec`. If you want the `Image` library (e.g., for `` elements), then you will need the `RCTImage` `subspec`.
+
+You can specify which `subspec`s your app will depend on in a `Podfile` file. The easiest way to create a `Podfile` is by running the CocoaPods `init` command in the `/ios` subfolder of your project:
+
+```
+$ pod init
+```
+
+The `Podfile` will contain a boilerplate setup that you will tweak for your integration purposes. In the end, `Podfile` should look something similar to this:
+
+
+
+```
+# The target name is most likely the name of your project.
+target 'NumberTileGame' do
+
+ # Your 'node_modules' directory is probably in the root of your project,
+ # but if not, adjust the `:path` accordingly
+ pod 'React', :path => '../node_modules/react-native', :subspecs => [
+ 'Core',
+ 'CxxBridge', # Include this for RN >= 0.47
+ 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
+ 'RCTText',
+ 'RCTNetwork',
+ 'RCTWebSocket', # Needed for debugging
+ 'RCTAnimation', # Needed for FlatList and animations running on native UI thread
+ # Add any other subspecs you want to use in your project
+ ]
+ # Explicitly include Yoga if you are using RN >= 0.42.0
+ pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
+
+ # Third party deps podspec link
+ pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
+ pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
+ pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
+
+end
+```
+
+
+
+```
+source 'https://github.com/CocoaPods/Specs.git'
+
+# Required for Swift apps
+platform :ios, '8.0'
+use_frameworks!
+
+# The target name is most likely the name of your project.
+target 'swift-2048' do
+
+ # Your 'node_modules' directory is probably in the root of your project,
+ # but if not, adjust the `:path` accordingly
+ pod 'React', :path => '../node_modules/react-native', :subspecs => [
+ 'Core',
+ 'CxxBridge', # Include this for RN >= 0.47
+ 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
+ 'RCTText',
+ 'RCTNetwork',
+ 'RCTWebSocket', # needed for debugging
+ # Add any other subspecs you want to use in your project
+ ]
+ # Explicitly include Yoga if you are using RN >= 0.42.0
+ pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
+
+ # Third party deps podspec link
+ pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
+ pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
+ pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
+
+end
+```
+
+
+
+After you have created your `Podfile`, you are ready to install the React Native pod.
+
+```
+$ pod install
+```
+
+You should see output such as:
+
+```
+Analyzing dependencies
+Fetching podspec for `React` from `../node_modules/react-native`
+Downloading dependencies
+Installing React (0.26.0)
+Generating Pods project
+Integrating client project
+Sending stats
+Pod installation complete! There are 3 dependencies from the Podfile and 1 total pod installed.
+```
+
+> If this fails with errors mentioning `xcrun`, make sure that in Xcode in Preferences > Locations the Command Line Tools are assigned.
+
+
+
+> If you get a warning such as "_The `swift-2048 [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-swift-2048/Pods-swift-2048.debug.xcconfig`. This can lead to problems with the CocoaPods installation_", then make sure the `Framework Search Paths` in `Build Settings` for both `Debug` and `Release` only contain `$(inherited)`.
+
+
+
+### Code integration
+
+Now we will actually modify the native iOS application to integrate React Native. For our 2048 sample app, we will add a "High Score" screen in React Native.
+
+#### The React Native component
+
+The first bit of code we will write is the actual React Native code for the new "High Score" screen that will be integrated into our application.
+
+##### 1. Create a `index.js` file
+
+First, create an empty `index.js` file in the root of your React Native project.
+
+`index.js` is the starting point for React Native applications, and it is always required. It can be a small file that `require`s other file that are part of your React Native component or application, or it can contain all the code that is needed for it. In our case, we will just put everything in `index.js`.
+
+##### 2. Add your React Native code
+
+In your `index.js`, create your component. In our sample here, we will add simple `` component within a styled ``
+
+```javascript
+import React from 'react';
+import {AppRegistry, StyleSheet, Text, View} from 'react-native';
+
+class RNHighScores extends React.Component {
+ render() {
+ var contents = this.props['scores'].map((score) => (
+
+ {score.name}:{score.value}
+ {'\n'}
+
+ ));
+ return (
+
+ 2048 High Scores!
+ {contents}
+
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ backgroundColor: '#FFFFFF',
+ },
+ highScoresTitle: {
+ fontSize: 20,
+ textAlign: 'center',
+ margin: 10,
+ },
+ scores: {
+ textAlign: 'center',
+ color: '#333333',
+ marginBottom: 5,
+ },
+});
+
+// Module name
+AppRegistry.registerComponent('RNHighScores', () => RNHighScores);
+```
+
+> `RNHighScores` is the name of your module that will be used when you add a view to React Native from within your iOS application.
+
+#### The Magic: `RCTRootView`
+
+Now that your React Native component is created via `index.js`, you need to add that component to a new or existing `ViewController`. The easiest path to take is to optionally create an event path to your component and then add that component to an existing `ViewController`.
+
+We will tie our React Native component with a new native view in the `ViewController` that will actually host it called `RCTRootView` .
+
+##### 1. Create an Event Path
+
+You can add a new link on the main game menu to go to the "High Score" React Native page.
+
+
+
+##### 2. Event Handler
+
+We will now add an event handler from the menu link. A method will be added to the main `ViewController` of your application. This is where `RCTRootView` comes into play.
+
+When you build a React Native application, you use the React Native packager to create an `index.bundle` that will be served by the React Native server. Inside `index.bundle` will be our `RNHighScore` module. So, we need to point our `RCTRootView` to the location of the `index.bundle` resource (via `NSURL`) and tie it to the module.
+
+We will, for debugging purposes, log that the event handler was invoked. Then, we will create a string with the location of our React Native code that exists inside the `index.bundle`. Finally, we will create the main `RCTRootView`. Notice how we provide `RNHighScores` as the `moduleName` that we created [above](#the-react-native-component) when writing the code for our React Native component.
+
+
+
+First `import` the `RCTRootView` header.
+
+```objectivec
+#import
+```
+
+> The `initialProperties` are here for illustration purposes so we have some data for our high score screen. In our React Native component, we will use `this.props` to get access to that data.
+
+```objectivec
+- (IBAction)highScoreButtonPressed:(id)sender {
+ NSLog(@"High Score Button Pressed");
+ NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"];
+
+ RCTRootView *rootView =
+ [[RCTRootView alloc] initWithBundleURL: jsCodeLocation
+ moduleName: @"RNHighScores"
+ initialProperties:
+ @{
+ @"scores" : @[
+ @{
+ @"name" : @"Alex",
+ @"value": @"42"
+ },
+ @{
+ @"name" : @"Joel",
+ @"value": @"10"
+ }
+ ]
+ }
+ launchOptions: nil];
+ UIViewController *vc = [[UIViewController alloc] init];
+ vc.view = rootView;
+ [self presentViewController:vc animated:YES completion:nil];
+}
+```
+
+> Note that `RCTRootView initWithURL` starts up a new JSC VM. To save resources and simplify the communication between RN views in different parts of your native app, you can have multiple views powered by React Native that are associated with a single JS runtime. To do that, instead of using `[RCTRootView alloc] initWithURL`, use [`RCTBridge initWithBundleURL`](https://github.com/facebook/react-native/blob/master/React/Base/RCTBridge.h#L93) to create a bridge and then use `RCTRootView initWithBridge`.
+
+
+
+First `import` the `React` library.
+
+```javascript
+import React
+```
+
+> The `initialProperties` are here for illustration purposes so we have some data for our high score screen. In our React Native component, we will use `this.props` to get access to that data.
+
+```swift
+@IBAction func highScoreButtonTapped(sender : UIButton) {
+ NSLog("Hello")
+ let jsCodeLocation = URL(string: "http://localhost:8081/index.bundle?platform=ios")
+ let mockData:NSDictionary = ["scores":
+ [
+ ["name":"Alex", "value":"42"],
+ ["name":"Joel", "value":"10"]
+ ]
+ ]
+
+ let rootView = RCTRootView(
+ bundleURL: jsCodeLocation,
+ moduleName: "RNHighScores",
+ initialProperties: mockData as [NSObject : AnyObject],
+ launchOptions: nil
+ )
+ let vc = UIViewController()
+ vc.view = rootView
+ self.present(vc, animated: true, completion: nil)
+}
+```
+
+> Note that `RCTRootView bundleURL` starts up a new JSC VM. To save resources and simplify the communication between RN views in different parts of your native app, you can have multiple views powered by React Native that are associated with a single JS runtime. To do that, instead of using `RCTRootView bundleURL`, use [`RCTBridge initWithBundleURL`](https://github.com/facebook/react-native/blob/master/React/Base/RCTBridge.h#L89) to create a bridge and then use `RCTRootView initWithBridge`.
+
+
+
+> When moving your app to production, the `NSURL` can point to a pre-bundled file on disk via something like `[[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];`. You can use the `react-native-xcode.sh` script in `node_modules/react-native/scripts/` to generate that pre-bundled file.
+
+
+
+> When moving your app to production, the `NSURL` can point to a pre-bundled file on disk via something like `let mainBundle = NSBundle(URLForResource: "main" withExtension:"jsbundle")`. You can use the `react-native-xcode.sh` script in `node_modules/react-native/scripts/` to generate that pre-bundled file.
+
+
+
+##### 3. Wire Up
+
+Wire up the new link in the main menu to the newly added event handler method.
+
+
+
+> One of the easier ways to do this is to open the view in the storyboard and right click on the new link. Select something such as the `Touch Up Inside` event, drag that to the storyboard and then select the created method from the list provided.
+
+### Test your integration
+
+You have now done all the basic steps to integrate React Native with your current application. Now we will start the React Native packager to build the `index.bundle` package and the server running on `localhost` to serve it.
+
+##### 1. Add App Transport Security exception
+
+Apple has blocked implicit cleartext HTTP resource loading. So we need to add the following our project's `Info.plist` (or equivalent) file.
+
+```xml
+NSAppTransportSecurity
+
+ NSExceptionDomains
+
+ localhost
+
+ NSTemporaryExceptionAllowsInsecureHTTPLoads
+
+
+
+
+```
+
+> App Transport Security is good for your users. Make sure to re-enable it prior to releasing your app for production.
+
+##### 2. Run the packager
+
+To run your app, you need to first start the development server. To do this, simply run the following command in the root directory of your React Native project:
+
+```
+$ npm start
+```
+
+##### 3. Run the app
+
+If you are using Xcode or your favorite editor, build and run your native iOS application as normal. Alternatively, you can run the app from the command line using:
+
+```
+# From the root of your project
+$ react-native run-ios
+```
+
+In our sample application, you should see the link to the "High Scores" and then when you click on that you will see the rendering of your React Native component.
+
+Here is the _native_ application home screen:
+
+
+
+Here is the _React Native_ high score screen:
+
+
+
+> If you are getting module resolution issues when running your application please see [this GitHub issue](https://github.com/facebook/react-native/issues/4968) for information and possible resolution. [This comment](https://github.com/facebook/react-native/issues/4968#issuecomment-220941717) seemed to be the latest possible resolution.
+
+### See the Code
+
+
+
+You can examine the code that added the React Native screen to our sample app on [GitHub](https://github.com/JoelMarcey/iOS-2048/commit/9ae70c7cdd53eb59f5f7c7daab382b0300ed3585).
+
+
+
+You can examine the code that added the React Native screen to our sample app on [GitHub](https://github.com/JoelMarcey/swift-2048/commit/13272a31ee6dd46dc68b1dcf4eaf16c1a10f5229).
+
+
+
+## Adding React Native to your app
+
+### Configuring maven
+
+Add the React Native dependency to your app's `build.gradle` file:
+
+```gradle
+dependencies {
+ implementation 'com.android.support:appcompat-v7:27.1.1'
+ ...
+ implementation "com.facebook.react:react-native:+" // From node_modules
+}
+```
+
+> If you want to ensure that you are always using a specific React Native version in your native build, replace `+` with an actual React Native version you've downloaded from `npm`.
+
+Add an entry for the local React Native maven directory to `build.gradle`. Be sure to add it to the "allprojects" block, above other maven repositories:
+
+```gradle
+allprojects {
+ repositories {
+ maven {
+ // All of React Native (JS, Android binaries) is installed from npm
+ url "$rootDir/../node_modules/react-native/android"
+ }
+ ...
+ }
+ ...
+}
+```
+
+> Make sure that the path is correct! You shouldn’t run into any “Failed to resolve: com.facebook.react:react-native:0.x.x" errors after running Gradle sync in Android Studio.
+
+### Configuring permissions
+
+Next, make sure you have the Internet permission in your `AndroidManifest.xml`:
+
+
+
+If you need to access to the `DevSettingsActivity` add to your `AndroidManifest.xml`:
+
+
+
+This is only used in dev mode when reloading JavaScript from the development server, so you can strip this in release builds if you need to.
+
+### Network Security Config (API level 28+)
+
+> Starting with Android 9 (API level 28), cleartext traffic is disabled by default; this prevents your application from connecting to the React Native packager. These changes add domain rules that specifically allow cleartext traffic to the packager IPs.
+
+#### 1. Create the following resource files
+
+`app/src/debug/res/xml/network_security_config.xml`:
+
+```xml
+
+
+
+
+ localhost
+ 10.0.2.2
+ 10.0.3.2
+
+
+```
+
+`app/src/release/res/xml/network_security_config.xml`:
+
+```xml
+
+
+
+
+ localhost
+ 10.0.2.2
+ 10.0.3.2
+
+
+```
+
+#### 2. Apply the config to your `AndroidManifest.xml`
+
+```xml
+
+
+
+
+
+```
+
+To learn more about Network Security Config and the cleartext traffic policy [see this link](https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted).
+
+### Code integration
+
+Now we will actually modify the native Android application to integrate React Native.
+
+#### The React Native component
+
+The first bit of code we will write is the actual React Native code for the new "High Score" screen that will be integrated into our application.
+
+##### 1. Create a `index.js` file
+
+First, create an empty `index.js` file in the root of your React Native project.
+
+`index.js` is the starting point for React Native applications, and it is always required. It can be a small file that `require`s other file that are part of your React Native component or application, or it can contain all the code that is needed for it. In our case, we will just put everything in `index.js`.
+
+##### 2. Add your React Native code
+
+In your `index.js`, create your component. In our sample here, we will add simple `` component within a styled ``:
+
+```javascript
+import React from 'react';
+import {AppRegistry, StyleSheet, Text, View} from 'react-native';
+
+class HelloWorld extends React.Component {
+ render() {
+ return (
+
+ Hello, World
+
+ );
+ }
+}
+var styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ hello: {
+ fontSize: 20,
+ textAlign: 'center',
+ margin: 10,
+ },
+});
+
+AppRegistry.registerComponent('MyReactNativeApp', () => HelloWorld);
+```
+
+##### 3. Configure permissions for development error overlay
+
+If your app is targeting the Android `API level 23` or greater, make sure you have the permission `android.permission.SYSTEM_ALERT_WINDOW` enabled for the development build. You can check this with `Settings.canDrawOverlays(this);`. This is required in dev builds because React Native development errors must be displayed above all the other windows. Due to the new permissions system introduced in the API level 23 (Android M), the user needs to approve it. This can be achieved by adding the following code to your Activity's in `onCreate()` method.
+
+```java
+private final int OVERLAY_PERMISSION_REQ_CODE = 1; // Choose any value
+
+...
+
+if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ if (!Settings.canDrawOverlays(this)) {
+ Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
+ Uri.parse("package:" + getPackageName()));
+ startActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE);
+ }
+}
+```
+
+Finally, the `onActivityResult()` method (as shown in the code below) has to be overridden to handle the permission Accepted or Denied cases for consistent UX. Also, for integrating Native Modules which use `startActivityForResult`, we need to pass the result to the `onActivityResult` method of our `ReactInstanceManager` instance.
+
+```java
+@Override
+protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if (requestCode == OVERLAY_PERMISSION_REQ_CODE) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ if (!Settings.canDrawOverlays(this)) {
+ // SYSTEM_ALERT_WINDOW permission not granted
+ }
+ }
+ }
+ mReactInstanceManager.onActivityResult( this, requestCode, resultCode, data );
+}
+```
+
+#### The Magic: `ReactRootView`
+
+Let's add some native code in order to start the React Native runtime and tell it to render our JS component. To do this, we're going to create an `Activity` that creates a `ReactRootView`, starts a React application inside it and sets it as the main content view.
+
+> If you are targetting Android version <5, use the `AppCompatActivity` class from the `com.android.support:appcompat` package instead of `Activity`.
+
+```java
+public class MyReactActivity extends Activity implements DefaultHardwareBackBtnHandler {
+ private ReactRootView mReactRootView;
+ private ReactInstanceManager mReactInstanceManager;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ mReactRootView = new ReactRootView(this);
+ mReactInstanceManager = ReactInstanceManager.builder()
+ .setApplication(getApplication())
+ .setCurrentActivity(this)
+ .setBundleAssetName("index.android.bundle")
+ .setJSMainModulePath("index")
+ .addPackage(new MainReactPackage())
+ .setUseDeveloperSupport(BuildConfig.DEBUG)
+ .setInitialLifecycleState(LifecycleState.RESUMED)
+ .build();
+ // The string here (e.g. "MyReactNativeApp") has to match
+ // the string in AppRegistry.registerComponent() in index.js
+ mReactRootView.startReactApplication(mReactInstanceManager, "MyReactNativeApp", null);
+
+ setContentView(mReactRootView);
+ }
+
+ @Override
+ public void invokeDefaultOnBackPressed() {
+ super.onBackPressed();
+ }
+}
+```
+
+> If you are using a starter kit for React Native, replace the "HelloWorld" string with the one in your index.js file (it’s the first argument to the `AppRegistry.registerComponent()` method).
+
+If you are using Android Studio, use `Alt + Enter` to add all missing imports in your MyReactActivity class. Be careful to use your package’s `BuildConfig` and not the one from the `facebook` package.
+
+We need set the theme of `MyReactActivity` to `Theme.AppCompat.Light.NoActionBar` because some React Native UI components rely on this theme.
+
+```xml
+
+
+```
+
+> A `ReactInstanceManager` can be shared by multiple activities and/or fragments. You will want to make your own `ReactFragment` or `ReactActivity` and have a singleton _holder_ that holds a `ReactInstanceManager`. When you need the `ReactInstanceManager` (e.g., to hook up the `ReactInstanceManager` to the lifecycle of those Activities or Fragments) use the one provided by the singleton.
+
+Next, we need to pass some activity lifecycle callbacks to the `ReactInstanceManager` and `ReactRootView`:
+
+```java
+@Override
+protected void onPause() {
+ super.onPause();
+
+ if (mReactInstanceManager != null) {
+ mReactInstanceManager.onHostPause(this);
+ }
+}
+
+@Override
+protected void onResume() {
+ super.onResume();
+
+ if (mReactInstanceManager != null) {
+ mReactInstanceManager.onHostResume(this, this);
+ }
+}
+
+@Override
+protected void onDestroy() {
+ super.onDestroy();
+
+ if (mReactInstanceManager != null) {
+ mReactInstanceManager.onHostDestroy(this);
+ }
+ if (mReactRootView != null) {
+ mReactRootView.unmountReactApplication();
+ }
+}
+```
+
+We also need to pass back button events to React Native:
+
+```java
+@Override
+ public void onBackPressed() {
+ if (mReactInstanceManager != null) {
+ mReactInstanceManager.onBackPressed();
+ } else {
+ super.onBackPressed();
+ }
+}
+```
+
+This allows JavaScript to control what happens when the user presses the hardware back button (e.g. to implement navigation). When JavaScript doesn't handle the back button press, your `invokeDefaultOnBackPressed` method will be called. By default this simply finishes your `Activity`.
+
+Finally, we need to hook up the dev menu. By default, this is activated by (rage) shaking the device, but this is not very useful in emulators. So we make it show when you press the hardware menu button (use `Ctrl + M` if you're using Android Studio emulator):
+
+```java
+@Override
+public boolean onKeyUp(int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_MENU && mReactInstanceManager != null) {
+ mReactInstanceManager.showDevOptionsDialog();
+ return true;
+ }
+ return super.onKeyUp(keyCode, event);
+}
+```
+
+Now your activity is ready to run some JavaScript code.
+
+### Test your integration
+
+You have now done all the basic steps to integrate React Native with your current application. Now we will start the React Native packager to build the `index.bundle` package and the server running on localhost to serve it.
+
+##### 1. Run the packager
+
+To run your app, you need to first start the development server. To do this, simply run the following command in the root directory of your React Native project:
+
+```
+$ yarn start
+```
+
+##### 2. Run the app
+
+Now build and run your Android app as normal.
+
+Once you reach your React-powered activity inside the app, it should load the JavaScript code from the development server and display:
+
+
+
+### Creating a release build in Android Studio
+
+You can use Android Studio to create your release builds too! It’s as easy as creating release builds of your previously-existing native Android app. There’s just one additional step, which you’ll have to do before every release build. You need to execute the following to create a React Native bundle, which will be included with your native Android app:
+
+```
+$ react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/com/your-company-name/app-package-name/src/main/assets/index.android.bundle --assets-dest android/com/your-company-name/app-package-name/src/main/res/
+```
+
+> Don’t forget to replace the paths with correct ones and create the assets folder if it doesn’t exist.
+
+Now just create a release build of your native app from within Android Studio as usual and you should be good to go!
+
+
+
+### Now what?
+
+At this point you can continue developing your app as usual. Refer to our [debugging](debugging.md) and [deployment](running-on-device.md) docs to learn more about working with React Native.
+
+
diff --git a/docs/interactionmanager.md b/docs/interactionmanager.md
new file mode 100644
index 0000000..e7ff924
--- /dev/null
+++ b/docs/interactionmanager.md
@@ -0,0 +1,96 @@
+---
+id: interactionmanager
+title: InteractionManager
+---
+
+InteractionManager allows long-running work to be scheduled after any interactions/animations have completed. In particular, this allows JavaScript animations to run smoothly.
+
+Applications can schedule tasks to run after interactions with the following:
+
+```javascript
+InteractionManager.runAfterInteractions(() => {
+ // ...long-running synchronous task...
+});
+```
+
+Compare this to other scheduling alternatives:
+
+* requestAnimationFrame(): for code that animates a view over time.
+* setImmediate/setTimeout(): run code later, note this may delay animations.
+* runAfterInteractions(): run code later, without delaying active animations.
+
+The touch handling system considers one or more active touches to be an 'interaction' and will delay `runAfterInteractions()` callbacks until all touches have ended or been cancelled.
+
+InteractionManager also allows applications to register animations by creating an interaction 'handle' on animation start, and clearing it upon completion:
+
+```javascript
+var handle = InteractionManager.createInteractionHandle();
+// run animation... (`runAfterInteractions` tasks are queued)
+// later, on animation completion:
+InteractionManager.clearInteractionHandle(handle);
+// queued tasks run if all handles were cleared
+```
+
+`runAfterInteractions` takes either a plain callback function, or a `PromiseTask` object with a `gen` method that returns a `Promise`. If a `PromiseTask` is supplied, then it is fully resolved (including asynchronous dependencies that also schedule more tasks via `runAfterInteractions`) before starting on the next task that might have been queued up synchronously earlier.
+
+By default, queued tasks are executed together in a loop in one `setImmediate` batch. If `setDeadline` is called with a positive number, then tasks will only be executed until the deadline (in terms of js event loop run time) approaches, at which point execution will yield via setTimeout, allowing events such as touches to start interactions and block queued tasks from executing, making apps more responsive.
+
+### Methods
+
+* [`runAfterInteractions`](interactionmanager.md#runafterinteractions)
+* [`createInteractionHandle`](interactionmanager.md#createinteractionhandle)
+* [`clearInteractionHandle`](interactionmanager.md#clearinteractionhandle)
+* [`setDeadline`](interactionmanager.md#setdeadline)
+
+### Properties
+
+* [`Events`](interactionmanager.md#events)
+* [`addListener`](interactionmanager.md#addlistener)
+
+---
+
+# Reference
+
+## Methods
+
+### `runAfterInteractions()`
+
+```javascript
+static runAfterInteractions(task)
+```
+
+Schedule a function to run after all interactions have completed. Returns a cancellable "promise".
+
+---
+
+### `createInteractionHandle()`
+
+```javascript
+static createInteractionHandle()
+```
+
+Notify manager that an interaction has started.
+
+---
+
+### `clearInteractionHandle()`
+
+```javascript
+static clearInteractionHandle(handle)
+```
+
+Notify manager that an interaction has completed.
+
+---
+
+### `setDeadline()`
+
+```javascript
+static setDeadline(deadline)
+```
+
+A positive number will use setTimeout to schedule any tasks after the eventLoopRunningTime hits the deadline value, otherwise all tasks will be executed in one setImmediate batch (default).
+
+## Properties
+
+---
diff --git a/docs/javascript-environment.md b/docs/javascript-environment.md
new file mode 100644
index 0000000..4c9a1b2
--- /dev/null
+++ b/docs/javascript-environment.md
@@ -0,0 +1,86 @@
+---
+id: javascript-environment
+title: JavaScript Environment
+---
+
+## JavaScript Runtime
+
+When using React Native, you're going to be running your JavaScript code in two environments:
+
+* In most cases, React Native will use [JavaScriptCore](http://trac.webkit.org/wiki/JavaScriptCore), the JavaScript engine that powers Safari. Note that on iOS, JavaScriptCore does not use JIT due to the absence of writable executable memory in iOS apps.
+* When using Chrome debugging, all JavaScript code runs within Chrome itself, communicating with native code via WebSockets. Chrome uses [V8](https://code.google.com/p/v8/) as its JavaScript engine.
+
+While both environments are very similar, you may end up hitting some inconsistencies. We're likely going to experiment with other JavaScript engines in the future, so it's best to avoid relying on specifics of any runtime.
+
+## JavaScript Syntax Transformers
+
+Syntax transformers make writing code more enjoyable by allowing you to use new JavaScript syntax without having to wait for support on all interpreters.
+
+React Native ships with the [Babel JavaScript compiler](https://babeljs.io). Check [Babel documentation](https://babeljs.io/docs/plugins/#transform-plugins) on its supported transformations for more details.
+
+Here's a full list of React Native's [enabled transformations](https://github.com/facebook/react-native/blob/master/babel-preset/configs/main.js#L16).
+
+ES5
+
+* Reserved Words: `promise.catch(function() { });`
+
+ES6
+
+* [Arrow functions](http://babeljs.io/docs/learn-es2015/#arrows): ` this.setState({pressed: true})}`
+* [Block scoping](https://babeljs.io/docs/learn-es2015/#let-const): `let greeting = 'hi';`
+* [Call spread](http://babeljs.io/docs/learn-es2015/#default-rest-spread): `Math.max(...array);`
+* [Classes](http://babeljs.io/docs/learn-es2015/#classes): `class C extends React.Component { render() { return ; } }`
+* [Constants](https://babeljs.io/docs/learn-es2015/#let-const): `const answer = 42;`
+* [Destructuring](http://babeljs.io/docs/learn-es2015/#destructuring): `var {isActive, style} = this.props;`
+* [for...of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of): `for (var num of [1, 2, 3]) {}`
+* [Modules](http://babeljs.io/docs/learn-es2015/#modules): `import React, { Component } from 'react';`
+* [Computed Properties](http://babeljs.io/docs/learn-es2015/#enhanced-object-literals): `var key = 'abc'; var obj = {[key]: 10};`
+* [Object Concise Method](http://babeljs.io/docs/learn-es2015/#enhanced-object-literals): `var obj = { method() { return 10; } };`
+* [Object Short Notation](http://babeljs.io/docs/learn-es2015/#enhanced-object-literals): `var name = 'vjeux'; var obj = { name };`
+* [Rest Params](https://github.com/sebmarkbage/ecmascript-rest-spread): `function(type, ...args) { }`
+* [Template Literals](http://babeljs.io/docs/learn-es2015/#template-strings): `` var who = 'world'; var str = `Hello ${who}`; ``
+
+ES8
+
+* [Function Trailing Comma](https://github.com/jeffmo/es-trailing-function-commas): `function f(a, b, c,) { }`
+* [Async Functions](https://github.com/tc39/ecmascript-asyncawait): `async function doStuffAsync() { const foo = await doOtherStuffAsync(); }`;
+
+Stage 3
+
+* [Object Spread](https://github.com/sebmarkbage/ecmascript-rest-spread): `var extended = { ...obj, a: 10 };`
+
+Specific
+
+* [JSX](https://reactjs.org/docs/jsx-in-depth.html): ``
+* [Flow](http://flowtype.org/): `function foo(x: ?number): string {}`
+
+## Polyfills
+
+Many standards functions are also available on all the supported JavaScript runtimes.
+
+Browser
+
+* [console.{log, warn, error, info, trace, table, group, groupEnd}](https://developer.chrome.com/devtools/docs/console-api)
+* [CommonJS require](https://nodejs.org/docs/latest/api/modules.html)
+* [XMLHttpRequest, fetch](network.md#content)
+* [{set, clear}{Timeout, Interval, Immediate}, {request, cancel}AnimationFrame](timers.md#content)
+* [navigator.geolocation](geolocation.md#content)
+
+ES6
+
+* [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+* String.prototype.{[startsWith](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith), [endsWith](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith), [repeat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat), [includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes)}
+* [Array.from](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)
+* Array.prototype.{[find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find), [findIndex](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex)}
+
+ES7
+
+* Array.prototype.{[includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes)}
+
+ES8
+
+* Object.{[entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries), [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values)}
+
+Specific
+
+* `__DEV__`
diff --git a/docs/keyboard.md b/docs/keyboard.md
new file mode 100644
index 0000000..ee7bdf7
--- /dev/null
+++ b/docs/keyboard.md
@@ -0,0 +1,115 @@
+---
+id: keyboard
+title: Keyboard
+---
+
+`Keyboard` module to control keyboard events.
+
+### Usage
+
+The Keyboard module allows you to listen for native events and react to them, as well as make changes to the keyboard, like dismissing it.
+
+```javascript
+import React, {Component} from 'react';
+import {Keyboard, TextInput} from 'react-native';
+
+class Example extends Component {
+ componentDidMount() {
+ this.keyboardDidShowListener = Keyboard.addListener(
+ 'keyboardDidShow',
+ this._keyboardDidShow,
+ );
+ this.keyboardDidHideListener = Keyboard.addListener(
+ 'keyboardDidHide',
+ this._keyboardDidHide,
+ );
+ }
+
+ componentWillUnmount() {
+ this.keyboardDidShowListener.remove();
+ this.keyboardDidHideListener.remove();
+ }
+
+ _keyboardDidShow() {
+ alert('Keyboard Shown');
+ }
+
+ _keyboardDidHide() {
+ alert('Keyboard Hidden');
+ }
+
+ render() {
+ return ;
+ }
+}
+```
+
+### Methods
+
+* [`addListener`](keyboard.md#addlistener)
+* [`removeListener`](keyboard.md#removelistener)
+* [`removeAllListeners`](keyboard.md#removealllisteners)
+* [`dismiss`](keyboard.md#dismiss)
+
+---
+
+# Reference
+
+## Methods
+
+### `addListener()`
+
+```javascript
+static addListener(eventName, callback)
+```
+
+The `addListener` function connects a JavaScript function to an identified native keyboard notification event.
+
+This function then returns the reference to the listener.
+
+@param {string} eventName The `nativeEvent` is the string that identifies the event you're listening for. This can be any of the following:
+
+* `keyboardWillShow`
+* `keyboardDidShow`
+* `keyboardWillHide`
+* `keyboardDidHide`
+* `keyboardWillChangeFrame`
+* `keyboardDidChangeFrame`
+
+Note that if you set `android:windowSoftInputMode` to `adjustResize` or `adjustNothing`, only `keyboardDidShow` and `keyboardDidHide` events will be available on Android. `keyboardWillShow` as well as `keyboardWillHide` are generally not available on Android since there is no native corresponding event.
+
+@param {function} callback function to be called when the event fires.
+
+---
+
+### `removeListener()`
+
+```javascript
+static removeListener(eventName, callback)
+```
+
+Removes a specific listener.
+
+@param {string} eventName The `nativeEvent` is the string that identifies the event you're listening for. @param {function} callback function to be called when the event fires.
+
+---
+
+### `removeAllListeners()`
+
+```javascript
+static removeAllListeners(eventName)
+```
+
+Removes all listeners for a specific event type.
+
+@param {string} eventType The native event string listeners are watching which will be removed.
+
+---
+
+### `dismiss()`
+
+```javascript
+static dismiss()
+```
+
+Dismisses the active keyboard and removes focus.
diff --git a/docs/keyboardavoidingview.md b/docs/keyboardavoidingview.md
new file mode 100644
index 0000000..0e0b7a3
--- /dev/null
+++ b/docs/keyboardavoidingview.md
@@ -0,0 +1,73 @@
+---
+id: keyboardavoidingview
+title: KeyboardAvoidingView
+---
+
+It is a component to solve the common problem of views that need to move out of the way of the virtual keyboard. It can automatically adjust either its position or bottom padding based on the position of the keyboard.
+
+Example usage:
+
+```javascript
+import {KeyboardAvoidingView} from 'react-native';
+
+
+ ... your UI ...
+;
+```
+
+### Example
+
+
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`keyboardVerticalOffset`](keyboardavoidingview.md#keyboardverticaloffset)
+- [`behavior`](keyboardavoidingview.md#behavior)
+- [`contentContainerStyle`](keyboardavoidingview.md#contentcontainerstyle)
+- [`enabled`](keyboardavoidingview.md#enabled)
+
+---
+
+# Reference
+
+## Props
+
+### `keyboardVerticalOffset`
+
+This is the distance between the top of the user screen and the react native view, may be non-zero in some use cases.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `behavior`
+
+_Note: Android and iOS both interact with this prop differently._ _Android may behave better when given no behavior prop at all, whereas iOS is the opposite._
+
+| Type | Required |
+| ------------------------------------- | -------- |
+| enum('height', 'position', 'padding') | No |
+
+---
+
+### `contentContainerStyle`
+
+The style of the content container(View) when behavior is 'position'.
+
+| Type | Required |
+| ---------- | -------- |
+| View.style | No |
+
+---
+
+### `enabled`
+
+Enabled or disabled KeyboardAvoidingView. The default is `true`.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
diff --git a/docs/layout-props.md b/docs/layout-props.md
new file mode 100644
index 0000000..3ac4b3c
--- /dev/null
+++ b/docs/layout-props.md
@@ -0,0 +1,656 @@
+---
+id: layout-props
+title: Layout Props
+---
+
+### Props
+
+* [`alignContent`](layout-props.md#aligncontent)
+* [`alignItems`](layout-props.md#alignitems)
+* [`alignSelf`](layout-props.md#alignself)
+* [`aspectRatio`](layout-props.md#aspectratio)
+* [`borderBottomWidth`](layout-props.md#borderbottomwidth)
+* [`borderEndWidth`](layout-props.md#borderendwidth)
+* [`borderLeftWidth`](layout-props.md#borderleftwidth)
+* [`borderRightWidth`](layout-props.md#borderrightwidth)
+* [`borderStartWidth`](layout-props.md#borderstartwidth)
+* [`borderTopWidth`](layout-props.md#bordertopwidth)
+* [`borderWidth`](layout-props.md#borderwidth)
+* [`bottom`](layout-props.md#bottom)
+* [`direction`](layout-props.md#direction)
+* [`display`](layout-props.md#display)
+* [`end`](layout-props.md#end)
+* [`flex`](layout-props.md#flex)
+* [`flexBasis`](layout-props.md#flexbasis)
+* [`flexDirection`](layout-props.md#flexdirection)
+* [`flexGrow`](layout-props.md#flexgrow)
+* [`flexShrink`](layout-props.md#flexshrink)
+* [`flexWrap`](layout-props.md#flexwrap)
+* [`height`](layout-props.md#height)
+* [`justifyContent`](layout-props.md#justifycontent)
+* [`left`](layout-props.md#left)
+* [`margin`](layout-props.md#margin)
+* [`marginBottom`](layout-props.md#marginbottom)
+* [`marginEnd`](layout-props.md#marginend)
+* [`marginHorizontal`](layout-props.md#marginhorizontal)
+* [`marginLeft`](layout-props.md#marginleft)
+* [`marginRight`](layout-props.md#marginright)
+* [`marginStart`](layout-props.md#marginstart)
+* [`marginTop`](layout-props.md#margintop)
+* [`marginVertical`](layout-props.md#marginvertical)
+* [`maxHeight`](layout-props.md#maxheight)
+* [`maxWidth`](layout-props.md#maxwidth)
+* [`minHeight`](layout-props.md#minheight)
+* [`minWidth`](layout-props.md#minwidth)
+* [`overflow`](layout-props.md#overflow)
+* [`padding`](layout-props.md#padding)
+* [`paddingBottom`](layout-props.md#paddingbottom)
+* [`paddingEnd`](layout-props.md#paddingend)
+* [`paddingHorizontal`](layout-props.md#paddinghorizontal)
+* [`paddingLeft`](layout-props.md#paddingleft)
+* [`paddingRight`](layout-props.md#paddingright)
+* [`paddingStart`](layout-props.md#paddingstart)
+* [`paddingTop`](layout-props.md#paddingtop)
+* [`paddingVertical`](layout-props.md#paddingvertical)
+* [`position`](layout-props.md#position)
+* [`right`](layout-props.md#right)
+* [`start`](layout-props.md#start)
+* [`top`](layout-props.md#top)
+* [`width`](layout-props.md#width)
+* [`zIndex`](layout-props.md#zindex)
+
+---
+
+# Reference
+
+## Props
+
+### `alignContent`
+
+`alignContent` controls how rows align in the cross direction, overriding the `alignContent` of the parent. See https://developer.mozilla.org/en-US/docs/Web/CSS/align-content for more details.
+
+| Type | Required |
+| ------------------------------------------------------------------------------------ | -------- |
+| enum('flex-start', 'flex-end', 'center', 'stretch', 'space-between', 'space-around') | No |
+
+---
+
+### `alignItems`
+
+`alignItems` aligns children in the cross direction. For example, if children are flowing vertically, `alignItems` controls how they align horizontally. It works like `align-items` in CSS (default: stretch). See https://developer.mozilla.org/en-US/docs/Web/CSS/align-items for more details.
+
+| Type | Required |
+| --------------------------------------------------------------- | -------- |
+| enum('flex-start', 'flex-end', 'center', 'stretch', 'baseline') | No |
+
+---
+
+### `alignSelf`
+
+`alignSelf` controls how a child aligns in the cross direction, overriding the `alignItems` of the parent. It works like `align-self` in CSS (default: auto). See https://developer.mozilla.org/en-US/docs/Web/CSS/align-self for more details.
+
+| Type | Required |
+| ----------------------------------------------------------------------- | -------- |
+| enum('auto', 'flex-start', 'flex-end', 'center', 'stretch', 'baseline') | No |
+
+---
+
+### `aspectRatio`
+
+Aspect ratio controls the size of the undefined dimension of a node. Aspect ratio is a non-standard property only available in React Native and not CSS.
+
+* On a node with a set width/height aspect ratio controls the size of the unset dimension
+* On a node with a set flex basis aspect ratio controls the size of the node in the cross axis if unset
+* On a node with a measure function aspect ratio works as though the measure function measures the flex basis
+* On a node with flex grow/shrink aspect ratio controls the size of the node in the cross axis if unset
+* Aspect ratio takes min/max dimensions into account
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderBottomWidth`
+
+`borderBottomWidth` works like `border-bottom-width` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderEndWidth`
+
+When direction is `ltr`, `borderEndWidth` is equivalent to `borderRightWidth`. When direction is `rtl`, `borderEndWidth` is equivalent to `borderLeftWidth`.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderLeftWidth`
+
+`borderLeftWidth` works like `border-left-width` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderRightWidth`
+
+`borderRightWidth` works like `border-right-width` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderStartWidth`
+
+When direction is `ltr`, `borderStartWidth` is equivalent to `borderLeftWidth`. When direction is `rtl`, `borderStartWidth` is equivalent to `borderRightWidth`.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderTopWidth`
+
+`borderTopWidth` works like `border-top-width` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderWidth`
+
+`borderWidth` works like `border-width` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/border-width for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `bottom`
+
+`bottom` is the number of logical pixels to offset the bottom edge of this component.
+
+It works similarly to `bottom` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See https://developer.mozilla.org/en-US/docs/Web/CSS/bottom for more details of how `bottom` affects layout.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `direction`
+
+`direction` specifies the directional flow of the user interface. The default is `inherit`, except for root node which will have value based on the current locale. See https://yogalayout.com/docs/layout-direction for more details.
+
+| Type | Required | Platform |
+| ----------------------------- | -------- | -------- |
+| enum('inherit', 'ltr', 'rtl') | No | iOS |
+
+---
+
+### `display`
+
+`display` sets the display type of this component.
+
+It works similarly to `display` in CSS, but only support 'flex' and 'none'. 'flex' is the default.
+
+| Type | Required |
+| -------------------- | -------- |
+| enum('none', 'flex') | No |
+
+---
+
+### `end`
+
+When the direction is `ltr`, `end` is equivalent to `right`. When the direction is `rtl`, `end` is equivalent to `left`.
+
+This style takes precedence over the `left` and `right` styles.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `flex`
+
+In React Native `flex` does not work the same way that it does in CSS. `flex` is a number rather than a string, and it works according to the `Yoga` library at https://github.com/facebook/yoga
+
+When `flex` is a positive number, it makes the component flexible and it will be sized proportional to its flex value. So a component with `flex` set to 2 will take twice the space as a component with `flex` set to 1.
+
+When `flex` is 0, the component is sized according to `width` and `height` and it is inflexible.
+
+When `flex` is -1, the component is normally sized according `width` and `height`. However, if there's not enough space, the component will shrink to its `minWidth` and `minHeight`.
+
+flexGrow, flexShrink, and flexBasis work the same as in CSS.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `flexBasis`
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `flexDirection`
+
+`flexDirection` controls which directions children of a container go. `row` goes left to right, `column` goes top to bottom, and you may be able to guess what the other two do. It works like `flex-direction` in CSS, except the default is `column`. See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction for more details.
+
+| Type | Required |
+| ------------------------------------------------------ | -------- |
+| enum('row', 'row-reverse', 'column', 'column-reverse') | No |
+
+---
+
+### `flexGrow`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `flexShrink`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `flexWrap`
+
+`flexWrap` controls whether children can wrap around after they hit the end of a flex container. It works like `flex-wrap` in CSS (default: nowrap). See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap for more details. Note it does not work anymore with `alignItems: stretch` (the default), so you may want to use `alignItems: flex-start` for example (breaking change details: https://github.com/facebook/react-native/releases/tag/v0.28.0).
+
+| Type | Required |
+| ---------------------- | -------- |
+| enum('wrap', 'nowrap') | No |
+
+---
+
+### `height`
+
+`height` sets the height of this component.
+
+It works similarly to `height` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported. See https://developer.mozilla.org/en-US/docs/Web/CSS/height for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `justifyContent`
+
+`justifyContent` aligns children in the main direction. For example, if children are flowing vertically, `justifyContent` controls how they align vertically. It works like `justify-content` in CSS (default: flex-start). See https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content for more details.
+
+| Type | Required |
+| ----------------------------------------------------------------------------------------- | -------- |
+| enum('flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly') | No |
+
+---
+
+### `left`
+
+`left` is the number of logical pixels to offset the left edge of this component.
+
+It works similarly to `left` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See https://developer.mozilla.org/en-US/docs/Web/CSS/left for more details of how `left` affects layout.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `margin`
+
+Setting `margin` has the same effect as setting each of `marginTop`, `marginLeft`, `marginBottom`, and `marginRight`. See https://developer.mozilla.org/en-US/docs/Web/CSS/margin for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginBottom`
+
+`marginBottom` works like `margin-bottom` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginEnd`
+
+When direction is `ltr`, `marginEnd` is equivalent to `marginRight`. When direction is `rtl`, `marginEnd` is equivalent to `marginLeft`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginHorizontal`
+
+Setting `marginHorizontal` has the same effect as setting both `marginLeft` and `marginRight`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginLeft`
+
+`marginLeft` works like `margin-left` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginRight`
+
+`marginRight` works like `margin-right` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginStart`
+
+When direction is `ltr`, `marginStart` is equivalent to `marginLeft`. When direction is `rtl`, `marginStart` is equivalent to `marginRight`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginTop`
+
+`marginTop` works like `margin-top` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginVertical`
+
+Setting `marginVertical` has the same effect as setting both `marginTop` and `marginBottom`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `maxHeight`
+
+`maxHeight` is the maximum height for this component, in logical pixels.
+
+It works similarly to `max-height` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See https://developer.mozilla.org/en-US/docs/Web/CSS/max-height for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `maxWidth`
+
+`maxWidth` is the maximum width for this component, in logical pixels.
+
+It works similarly to `max-width` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See https://developer.mozilla.org/en-US/docs/Web/CSS/max-width for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `minHeight`
+
+`minHeight` is the minimum height for this component, in logical pixels.
+
+It works similarly to `min-height` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See https://developer.mozilla.org/en-US/docs/Web/CSS/min-height for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `minWidth`
+
+`minWidth` is the minimum width for this component, in logical pixels.
+
+It works similarly to `min-width` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See https://developer.mozilla.org/en-US/docs/Web/CSS/min-width for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `overflow`
+
+`overflow` controls how children are measured and displayed. `overflow: hidden` causes views to be clipped while `overflow: scroll` causes views to be measured independently of their parents main axis. It works like `overflow` in CSS (default: visible). See https://developer.mozilla.org/en/docs/Web/CSS/overflow for more details. `overflow: visible` only works on iOS. On Android, all views will clip their children.
+
+| Type | Required |
+| ----------------------------------- | -------- |
+| enum('visible', 'hidden', 'scroll') | No |
+
+---
+
+### `padding`
+
+Setting `padding` has the same effect as setting each of `paddingTop`, `paddingBottom`, `paddingLeft`, and `paddingRight`. See https://developer.mozilla.org/en-US/docs/Web/CSS/padding for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingBottom`
+
+`paddingBottom` works like `padding-bottom` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingEnd`
+
+When direction is `ltr`, `paddingEnd` is equivalent to `paddingRight`. When direction is `rtl`, `paddingEnd` is equivalent to `paddingLeft`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingHorizontal`
+
+Setting `paddingHorizontal` is like setting both of `paddingLeft` and `paddingRight`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingLeft`
+
+`paddingLeft` works like `padding-left` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingRight`
+
+`paddingRight` works like `padding-right` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingStart`
+
+When direction is `ltr`, `paddingStart` is equivalent to `paddingLeft`. When direction is `rtl`, `paddingStart` is equivalent to `paddingRight`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingTop`
+
+`paddingTop` works like `padding-top` in CSS. See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top for more details.
+
+| Type | Required |
+| --------------- | -------- |
+| number, ,string | No |
+
+---
+
+### `paddingVertical`
+
+Setting `paddingVertical` is like setting both of `paddingTop` and `paddingBottom`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `position`
+
+`position` in React Native is similar to regular CSS, but everything is set to `relative` by default, so `absolute` positioning is always just relative to the parent.
+
+If you want to position a child using specific numbers of logical pixels relative to its parent, set the child to have `absolute` position.
+
+If you want to position a child relative to something that is not its parent, just don't use styles for that. Use the component tree.
+
+See https://github.com/facebook/yoga for more details on how `position` differs between React Native and CSS.
+
+| Type | Required |
+| ---------------------------- | -------- |
+| enum('absolute', 'relative') | No |
+
+---
+
+### `right`
+
+`right` is the number of logical pixels to offset the right edge of this component.
+
+It works similarly to `right` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See https://developer.mozilla.org/en-US/docs/Web/CSS/right for more details of how `right` affects layout.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `start`
+
+When the direction is `ltr`, `start` is equivalent to `left`. When the direction is `rtl`, `start` is equivalent to `right`.
+
+This style takes precedence over the `left`, `right`, and `end` styles.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `top`
+
+`top` is the number of logical pixels to offset the top edge of this component.
+
+It works similarly to `top` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See https://developer.mozilla.org/en-US/docs/Web/CSS/top for more details of how `top` affects layout.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `width`
+
+`width` sets the width of this component.
+
+It works similarly to `width` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported. See https://developer.mozilla.org/en-US/docs/Web/CSS/width for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `zIndex`
+
+`zIndex` controls which components display on top of others. Normally, you don't use `zIndex`. Components render according to their order in the document tree, so later components draw over earlier ones. `zIndex` may be useful if you have animations or custom modal interfaces where you don't want this behavior.
+
+It works like the CSS `z-index` property - components with a larger `zIndex` will render on top. Think of the z-direction like it's pointing from the phone into your eyeball. See https://developer.mozilla.org/en-US/docs/Web/CSS/z-index for more details.
+
+On iOS, `zIndex` may require `View`s to be siblings of each other for it to work as expected.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
diff --git a/docs/layoutanimation.md b/docs/layoutanimation.md
new file mode 100644
index 0000000..e300509
--- /dev/null
+++ b/docs/layoutanimation.md
@@ -0,0 +1,130 @@
+---
+id: layoutanimation
+title: LayoutAnimation
+---
+
+Automatically animates views to their new positions when the next layout happens.
+
+A common way to use this API is to call it before calling `setState`.
+
+Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:
+
+ UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
+
+### Methods
+
+* [`configureNext`](layoutanimation.md#configurenext)
+* [`create`](layoutanimation.md#create)
+* [`checkConfig`](layoutanimation.md#checkconfig)
+
+### Properties
+
+* [`Types`](layoutanimation.md#types)
+* [`Properties`](layoutanimation.md#properties)
+* [`Presets`](layoutanimation.md#presets)
+* [`easeInEaseOut`](layoutanimation.md#easeineaseout)
+* [`linear`](layoutanimation.md#linear)
+* [`spring`](layoutanimation.md#spring)
+
+---
+
+# Reference
+
+## Methods
+
+### `configureNext()`
+
+```javascript
+static configureNext(config, onAnimationDidEnd?)
+```
+
+Schedules an animation to happen on the next layout.
+
+#### Parameters:
+
+| Name | Type | Required | Description |
+| ----------------- | -------- | -------- | ---------------------------------------------------------- |
+| config | object | Yes | See config parameters below. |
+| onAnimationDidEnd | function | No | Called when the animation finished. Only supported on iOS. |
+
+##### config
+
+* `duration` in milliseconds
+* `create`, config for animating in new views (see `Anim` type)
+* `update`, config for animating views that have been updated (see `Anim` type)
+
+---
+
+### `create()`
+
+```javascript
+static create(duration, type, creationProp)
+```
+
+Helper for creating a config for `configureNext`.
+
+---
+
+### `checkConfig()`
+
+```javascript
+static checkConfig(config, location, name)
+```
+
+## Properties
+
+### Types
+
+An enumerate of animation types to be used in [`create`](layoutanimation.md#create) method.
+
+| Types |
+| ------------- |
+| spring |
+| linear |
+| easeInEaseOut |
+| easeIn |
+| easeOut |
+| keyboard |
+
+---
+
+### Properties
+
+An enumerate of object property to be animated, used in [`create`](layoutanimation.md#create) method.
+
+| Properties |
+| ---------- |
+| opacity |
+| scaleX |
+| scaleY |
+| scaleXY |
+
+---
+
+### Presets
+
+A set of predefined animation config.
+
+| Presets | Value |
+| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| easeInEaseOut | `create(300, 'easeInEaseOut', 'opacity')` |
+| linear | `create(500, 'linear', 'opacity')` |
+| spring | `{ duration: 700, create: { type: 'linear', property: 'opacity' }, update: { type: 'spring', springDamping: 0.4 }, delete: { type: 'linear', property: 'opacity' } }` |
+
+---
+
+### easeInEaseOut
+
+Shortcut to bind `configureNext()` methods with `Presets.easeInEaseOut`.
+
+---
+
+### linear
+
+Shortcut to bind `configureNext()` methods with `Presets.linear`.
+
+---
+
+### spring
+
+Shortcut to bind `configureNext()` methods with `Presets.spring`.
diff --git a/docs/linking-libraries-ios.md b/docs/linking-libraries-ios.md
new file mode 100644
index 0000000..0370909
--- /dev/null
+++ b/docs/linking-libraries-ios.md
@@ -0,0 +1,64 @@
+---
+id: linking-libraries-ios
+title: Linking Libraries
+---
+
+Not every app uses all the native capabilities, and including the code to support all those features would impact the binary size... But we still want to make it easy to add these features whenever you need them.
+
+With that in mind we exposed many of these features as independent static libraries.
+
+For most of the libs it will be as simple as dragging two files, sometimes a third step will be necessary, but no more than that.
+
+_All the libraries we ship with React Native live on the `Libraries` folder in the root of the repository. Some of them are pure JavaScript, and you only need to `require` it. Other libraries also rely on some native code, in that case you'll have to add these files to your app, otherwise the app will throw an error as soon as you try to use the library._
+
+## Here are the few steps to link your libraries that contain native code
+
+### Automatic linking
+
+#### Step 1
+
+Install a library with native dependencies:
+
+```bash
+$ npm install --save
+```
+
+> **_Note:_** `--save` or `--save-dev` flag is very important for this step. React Native will link your libs based on `dependencies` and `devDependencies` in your `package.json` file.
+
+#### Step 2
+
+Link your native dependencies:
+
+```bash
+$ react-native link
+```
+
+Done! All libraries with native dependencies should be successfully linked to your iOS/Android project.
+
+> **_Note:_** If your iOS project is using CocoaPods (contains `Podfile`) and linked library has `podspec` file, then `react-native link` will link library using Podfile. To support non-trivial Podfiles add `# Add new pods below this line` comment to places where you expect pods to be added.
+
+### Manual linking
+
+#### Step 1
+
+If the library has native code, there must be an `.xcodeproj` file inside its folder. Drag this file to your project on Xcode (usually under the `Libraries` group on Xcode);
+
+
+
+#### Step 2
+
+Click on your main project file (the one that represents the `.xcodeproj`) select `Build Phases` and drag the static library from the `Products` folder inside the Library you are importing to `Link Binary With Libraries`
+
+
+
+#### Step 3
+
+Not every library will need this step, what you need to consider is:
+
+_Do I need to know the contents of the library at compile time?_
+
+What that means is, are you using this library on the native side or only in JavaScript? If you are only using it in JavaScript, you are good to go!
+
+If you do need to call it from native, then we need to know the library's headers. To achieve that you have to go to your project's file, select `Build Settings` and search for `Header Search Paths`. There you should include the path to your library. (This documentation used to recommend using `recursive`, but this is no longer recommended, as it can cause subtle build failures, especially with CocoaPods.)
+
+
diff --git a/docs/linking.md b/docs/linking.md
new file mode 100644
index 0000000..80eb9fb
--- /dev/null
+++ b/docs/linking.md
@@ -0,0 +1,218 @@
+---
+id: linking
+title: Linking
+---
+
+
+
Projects with Native Code Only
+
+ This section only applies to projects made with react-native init
+ or to those made with expo init or Create React Native App which have since ejected. For
+ more information about ejecting, please see
+ the guide on
+ the Create React Native App repository.
+
+
+
+`Linking` gives you a general interface to interact with both incoming and outgoing app links.
+
+### Basic Usage
+
+#### Handling deep links
+
+If your app was launched from an external url registered to your app you can access and handle it from any component you want with
+
+```javascript
+componentDidMount() {
+ Linking.getInitialURL().then((url) => {
+ if (url) {
+ console.log('Initial url is: ' + url);
+ }
+ }).catch(err => console.error('An error occurred', err));
+}
+```
+
+> For instructions on how to add support for deep linking on Android, refer to [Enabling Deep Links for App Content - Add Intent Filters for Your Deep Links](http://developer.android.com/training/app-indexing/deep-linking.html#adding-filters).
+
+If you wish to receive the intent in an existing instance of MainActivity, you may set the `launchMode` of MainActivity to `singleTask` in `AndroidManifest.xml`. See [``](http://developer.android.com/guide/topics/manifest/activity-element.html) documentation for more information.
+
+```xml
+
+```
+
+NOTE: On iOS, you'll need to link `RCTLinking` to your project by following the steps described [here](linking-libraries-ios.md#manual-linking). If you also want to listen to incoming app links during your app's execution, you'll need to add the following lines to your `*AppDelegate.m`:
+
+```objectivec
+// iOS 9.x or newer
+#import
+
+- (BOOL)application:(UIApplication *)application
+ openURL:(NSURL *)url
+ options:(NSDictionary *)options
+{
+ return [RCTLinkingManager application:application openURL:url options:options];
+}
+```
+
+If you're targeting iOS 8.x or older, you can use the following code instead:
+
+```objectivec
+// iOS 8.x or older
+#import
+
+- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
+ sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
+{
+ return [RCTLinkingManager application:application openURL:url
+ sourceApplication:sourceApplication annotation:annotation];
+}
+```
+
+If your app is using [Universal Links](https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html), you'll need to add the following code as well:
+
+```objectivec
+- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
+ restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler
+{
+ return [RCTLinkingManager application:application
+ continueUserActivity:userActivity
+ restorationHandler:restorationHandler];
+}
+```
+
+And then on your React component you'll be able to listen to the events on `Linking` as follows
+
+```javascript
+componentDidMount() {
+ Linking.addEventListener('url', this._handleOpenURL);
+},
+componentWillUnmount() {
+ Linking.removeEventListener('url', this._handleOpenURL);
+},
+_handleOpenURL(event) {
+ console.log(event.url);
+}
+```
+
+#### Opening external links
+
+To start the corresponding activity for a link (web URL, email, contact etc.), call
+
+```javascript
+Linking.openURL(url).catch((err) => console.error('An error occurred', err));
+```
+
+If you want to check if any installed app can handle a given URL beforehand you can call
+
+```javascript
+Linking.canOpenURL(url)
+ .then((supported) => {
+ if (!supported) {
+ console.log("Can't handle url: " + url);
+ } else {
+ return Linking.openURL(url);
+ }
+ })
+ .catch((err) => console.error('An error occurred', err));
+```
+
+### Methods
+
+* [`constructor`](linking.md#constructor)
+* [`addEventListener`](linking.md#addeventlistener)
+* [`removeEventListener`](linking.md#removeeventlistener)
+* [`openURL`](linking.md#openurl)
+* [`canOpenURL`](linking.md#canopenurl)
+* [`getInitialURL`](linking.md#getinitialurl)
+
+---
+
+# Reference
+
+## Methods
+
+### `constructor()`
+
+```javascript
+constructor();
+```
+
+---
+
+### `addEventListener()`
+
+```javascript
+addEventListener(type, handler);
+```
+
+Add a handler to Linking changes by listening to the `url` event type and providing the handler
+
+---
+
+### `removeEventListener()`
+
+```javascript
+removeEventListener(type, handler);
+```
+
+Remove a handler by passing the `url` event type and the handler
+
+---
+
+### `openURL()`
+
+```javascript
+openURL(url);
+```
+
+Try to open the given `url` with any of the installed apps.
+
+You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386" on Android or "http://maps.apple.com/?ll=37.484847,-122.148386" on iOS), a contact, or any other URL that can be opened with the installed apps.
+
+The method returns a `Promise` object. If the user confirms the open dialog or the url automatically opens, the promise is resolved. If the user cancels the open dialog or there are no registered applications for the url, the promise is rejected.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ------ | -------- | ---------------- |
+| url | string | Yes | The URL to open. |
+
+> This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check {@code canOpenURL} first.
+
+> For web URLs, the protocol ("http://", "https://") must be set accordingly!
+
+---
+
+### `canOpenURL()`
+
+```javascript
+canOpenURL(url);
+```
+
+Determine whether or not an installed app can handle a given URL.
+
+The method returns a `Promise` object. When it is determined whether or not the given URL can be handled, the promise is resolved and the first parameter is whether or not it can be opened.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ------ | -------- | ---------------- |
+| url | string | Yes | The URL to open. |
+
+> For web URLs, the protocol ("http://", "https://") must be set accordingly!
+
+> As of iOS 9, your app needs to provide the `LSApplicationQueriesSchemes` key inside `Info.plist` or canOpenURL will always return false.
+
+---
+
+### `getInitialURL()`
+
+```javascript
+getInitialURL();
+```
+
+If the app launch was triggered by an app link, it will give the link url, otherwise it will give `null`
+
+> To support deep linking on Android, refer http://developer.android.com/training/app-indexing/deep-linking.html#handling-intents
diff --git a/docs/listview.md b/docs/listview.md
new file mode 100644
index 0000000..08ce324
--- /dev/null
+++ b/docs/listview.md
@@ -0,0 +1,298 @@
+---
+id: listview
+title: ListView
+---
+
+DEPRECATED - use one of the new list components, such as [`FlatList`](flatlist.md) or [`SectionList`](sectionlist.md) for bounded memory use, fewer bugs, better performance, an easier to use API, and more features. Check out this [blog post](https://facebook.github.io/react-native/blog/2017/03/13/better-list-views.html) for more details.
+
+ListView - A core component designed for efficient display of vertically scrolling lists of changing data. The minimal API is to create a [`ListView.DataSource`](listviewdatasource.md), populate it with a simple array of data blobs, and instantiate a `ListView` component with that data source and a `renderRow` callback which takes a blob from the data array and returns a renderable component.
+
+Minimal example:
+
+```javascript
+class MyComponent extends Component {
+ constructor() {
+ super();
+ const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
+ this.state = {
+ dataSource: ds.cloneWithRows(['row 1', 'row 2']),
+ };
+ }
+
+ render() {
+ return (
+ {rowData}}
+ />
+ );
+ }
+}
+```
+
+ListView also supports more advanced features, including sections with sticky section headers, header and footer support, callbacks on reaching the end of the available data (`onEndReached`) and on the set of rows that are visible in the device viewport change (`onChangeVisibleRows`), and several performance optimizations.
+
+There are a few performance operations designed to make ListView scroll smoothly while dynamically loading potentially very large (or conceptually infinite) data sets:
+
+* Only re-render changed rows - the rowHasChanged function provided to the data source tells the ListView if it needs to re-render a row because the source data has changed - see ListViewDataSource for more details.
+
+* Rate-limited row rendering - By default, only one row is rendered per event-loop (customizable with the `pageSize` prop). This breaks up the work into smaller chunks to reduce the chance of dropping frames while rendering rows.
+
+### Props
+
+* [ScrollView props...](scrollview.md#props)
+
+- [`dataSource`](listview.md#datasource)
+- [`initialListSize`](listview.md#initiallistsize)
+- [`onEndReachedThreshold`](listview.md#onendreachedthreshold)
+- [`pageSize`](listview.md#pagesize)
+- [`renderRow`](listview.md#renderrow)
+- [`renderScrollComponent`](listview.md#renderscrollcomponent)
+- [`scrollRenderAheadDistance`](listview.md#scrollrenderaheaddistance)
+- [`stickyHeaderIndices`](listview.md#stickyheaderindices)
+- [`enableEmptySections`](listview.md#enableemptysections)
+- [`renderHeader`](listview.md#renderheader)
+- [`onEndReached`](listview.md#onendreached)
+- [`stickySectionHeadersEnabled`](listview.md#stickysectionheadersenabled)
+- [`renderSectionHeader`](listview.md#rendersectionheader)
+- [`renderSeparator`](listview.md#renderseparator)
+- [`onChangeVisibleRows`](listview.md#onchangevisiblerows)
+- [`removeClippedSubviews`](listview.md#removeclippedsubviews)
+- [`renderFooter`](listview.md#renderfooter)
+
+### Methods
+
+* [`getMetrics`](listview.md#getmetrics)
+* [`scrollTo`](listview.md#scrollto)
+* [`scrollToEnd`](listview.md#scrolltoend)
+* [`flashScrollIndicators`](listview.md#flashscrollindicators)
+
+---
+
+# Reference
+
+## Props
+
+### `dataSource`
+
+An instance of [ListView.DataSource](listviewdatasource.md) to use
+
+| Type | Required |
+| ------------------ | -------- |
+| ListViewDataSource | Yes |
+
+---
+
+### `initialListSize`
+
+How many rows to render on initial component mount. Use this to make it so that the first screen worth of data appears at one time instead of over the course of multiple frames.
+
+| Type | Required |
+| ------ | -------- |
+| number | Yes |
+
+---
+
+### `onEndReachedThreshold`
+
+Threshold in pixels (virtual, not physical) for calling onEndReached.
+
+| Type | Required |
+| ------ | -------- |
+| number | Yes |
+
+---
+
+### `pageSize`
+
+Number of rows to render per event loop. Note: if your 'rows' are actually cells, i.e. they don't span the full width of your view (as in the ListViewGridLayoutExample), you should set the pageSize to be a multiple of the number of cells per row, otherwise you're likely to see gaps at the edge of the ListView as new pages are loaded.
+
+| Type | Required |
+| ------ | -------- |
+| number | Yes |
+
+---
+
+### `renderRow`
+
+(rowData, sectionID, rowID, highlightRow) => renderable
+
+Takes a data entry from the data source and its ids and should return a renderable component to be rendered as the row. By default the data is exactly what was put into the data source, but it's also possible to provide custom extractors. ListView can be notified when a row is being highlighted by calling `highlightRow(sectionID, rowID)`. This sets a boolean value of adjacentRowHighlighted in renderSeparator, allowing you to control the separators above and below the highlighted row. The highlighted state of a row can be reset by calling highlightRow(null).
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+---
+
+### `renderScrollComponent`
+
+(props) => renderable
+
+A function that returns the scrollable component in which the list rows are rendered. Defaults to returning a ScrollView with the given props.
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+---
+
+### `scrollRenderAheadDistance`
+
+How early to start rendering rows before they come on screen, in pixels.
+
+| Type | Required |
+| ------ | -------- |
+| number | Yes |
+
+---
+
+### `stickyHeaderIndices`
+
+An array of child indices determining which children get docked to the top of the screen when scrolling. For example, passing `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction with `horizontal={true}`.
+
+| Type | Required |
+| --------------- | -------- |
+| array of number | Yes |
+
+---
+
+### `enableEmptySections`
+
+Flag indicating whether empty section headers should be rendered. In the future release empty section headers will be rendered by default, and the flag will be deprecated. If empty sections are not desired to be rendered their indices should be excluded from sectionID object.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `renderHeader`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onEndReached`
+
+Called when all rows have been rendered and the list has been scrolled to within onEndReachedThreshold of the bottom. The native scroll event is provided.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `stickySectionHeadersEnabled`
+
+Makes the sections headers sticky. The sticky behavior means that it will scroll with the content at the top of the section until it reaches the top of the screen, at which point it will stick to the top until it is pushed off the screen by the next section header. This property is not supported in conjunction with `horizontal={true}`. Only enabled by default on iOS because of typical platform standards.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `renderSectionHeader`
+
+(sectionData, sectionID) => renderable
+
+If provided, a header is rendered for this section.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `renderSeparator`
+
+(sectionID, rowID, adjacentRowHighlighted) => renderable
+
+If provided, a renderable component to be rendered as the separator below each row but not the last row if there is a section header below. Take a sectionID and rowID of the row above and whether its adjacent row is highlighted.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onChangeVisibleRows`
+
+(visibleRows, changedRows) => void
+
+Called when the set of visible rows changes. `visibleRows` maps { sectionID: { rowID: true }} for all the visible rows, and `changedRows` maps { sectionID: { rowID: true | false }} for the rows that have changed their visibility, with true indicating visible, and false indicating the view has moved out of view.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `removeClippedSubviews`
+
+A performance optimization for improving scroll perf of large lists, used in conjunction with overflow: 'hidden' on the row containers. This is enabled by default.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `renderFooter`
+
+() => renderable
+
+The header and footer are always rendered (if these props are provided) on every render pass. If they are expensive to re-render, wrap them in StaticContainer or other mechanism as appropriate. Footer is always at the bottom of the list, and header at the top, on every render pass. In a horizontal ListView, the header is rendered on the left and the footer on the right.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+## Methods
+
+### `getMetrics()`
+
+```javascript
+getMetrics();
+```
+
+Exports some data, e.g. for perf investigations or analytics.
+
+---
+
+### `scrollTo()`
+
+```javascript
+scrollTo(...args: Array)
+```
+
+Scrolls to a given x, y offset, either immediately or with a smooth animation.
+
+See `ScrollView#scrollTo`.
+
+---
+
+### `scrollToEnd()`
+
+```javascript
+scrollToEnd(([options]: object));
+```
+
+If this is a vertical ListView scrolls to the bottom. If this is a horizontal ListView scrolls to the right.
+
+Use `scrollToEnd({animated: true})` for smooth animated scrolling, `scrollToEnd({animated: false})` for immediate scrolling. If no options are passed, `animated` defaults to true.
+
+See `ScrollView#scrollToEnd`.
+
+---
+
+### `flashScrollIndicators()`
+
+```javascript
+flashScrollIndicators();
+```
+
+Displays the scroll indicators momentarily.
diff --git a/docs/listviewdatasource.md b/docs/listviewdatasource.md
new file mode 100644
index 0000000..196210e
--- /dev/null
+++ b/docs/listviewdatasource.md
@@ -0,0 +1,200 @@
+---
+id: listviewdatasource
+title: ListViewDataSource
+---
+
+Provides efficient data processing and access to the `ListView` component. A `ListViewDataSource` is created with functions for extracting data from the input blob, and comparing elements (with default implementations for convenience). The input blob can be as simple as an array of strings, or an object with rows nested inside section objects.
+
+To update the data in the datasource, use `cloneWithRows` (or `cloneWithRowsAndSections` if you care about sections). The data in the data source is immutable, so you can't modify it directly. The clone methods suck in the new data and compute a diff for each row so ListView knows whether to re-render it or not.
+
+In this example, a component receives data in chunks, handled by `_onDataArrived`, which concats the new data onto the old data and updates the data source. We use `concat` to create a new array - mutating `this._data`, e.g. with `this._data.push(newRowData)`, would be an error. `_rowHasChanged` understands the shape of the row data and knows how to efficiently compare it.
+
+```javascript
+getInitialState: function() {
+ var ds = new ListView.DataSource({rowHasChanged: this._rowHasChanged});
+ return {ds};
+},
+_onDataArrived(newData) {
+ this._data = this._data.concat(newData);
+ this.setState({
+ ds: this.state.ds.cloneWithRows(this._data)
+ });
+}
+```
+
+### Methods
+
+* [`constructor`](listviewdatasource.md#constructor)
+* [`cloneWithRows`](listviewdatasource.md#clonewithrows)
+* [`cloneWithRowsAndSections`](listviewdatasource.md#clonewithrowsandsections)
+* [`getRowCount`](listviewdatasource.md#getrowcount)
+* [`getRowAndSectionCount`](listviewdatasource.md#getrowandsectioncount)
+* [`rowShouldUpdate`](listviewdatasource.md#rowshouldupdate)
+* [`getRowData`](listviewdatasource.md#getrowdata)
+* [`getRowIDForFlatIndex`](listviewdatasource.md#getrowidforflatindex)
+* [`getSectionIDForFlatIndex`](listviewdatasource.md#getsectionidforflatindex)
+* [`getSectionLengths`](listviewdatasource.md#getsectionlengths)
+* [`sectionHeaderShouldUpdate`](listviewdatasource.md#sectionheadershouldupdate)
+* [`getSectionHeaderData`](listviewdatasource.md#getsectionheaderdata)
+
+---
+
+# Reference
+
+## Methods
+
+### `constructor()`
+
+```javascript
+constructor(params);
+```
+
+You can provide custom extraction and `hasChanged` functions for section headers and rows. If absent, data will be extracted with the `defaultGetRowData` and `defaultGetSectionHeaderData` functions.
+
+The default extractor expects data of one of the following forms:
+
+ { sectionID_1: { rowID_1: , ... }, ... }
+
+or
+
+ { sectionID_1: [ , , ... ], ... }
+
+or
+
+ [ [ , , ... ], ... ]
+
+The constructor takes in a params argument that can contain any of the following:
+
+* getRowData(dataBlob, sectionID, rowID);
+* getSectionHeaderData(dataBlob, sectionID);
+* rowHasChanged(prevRowData, nextRowData);
+* sectionHeaderHasChanged(prevSectionData, nextSectionData);
+
+---
+
+### `cloneWithRows()`
+
+```javascript
+cloneWithRows(dataBlob, rowIdentities);
+```
+
+Clones this `ListViewDataSource` with the specified `dataBlob` and `rowIdentities`. The `dataBlob` is just an arbitrary blob of data. At construction an extractor to get the interesting information was defined (or the default was used).
+
+The `rowIdentities` is a 2D array of identifiers for rows. ie. [['a1', 'a2'], ['b1', 'b2', 'b3'], ...]. If not provided, it's assumed that the keys of the section data are the row identities.
+
+Note: This function does NOT clone the data in this data source. It simply passes the functions defined at construction to a new data source with the data specified. If you wish to maintain the existing data you must handle merging of old and new data separately and then pass that into this function as the `dataBlob`.
+
+---
+
+### `cloneWithRowsAndSections()`
+
+```javascript
+cloneWithRowsAndSections(dataBlob, sectionIdentities, rowIdentities);
+```
+
+This performs the same function as the `cloneWithRows` function but here you also specify what your `sectionIdentities` are. If you don't care about sections you should safely be able to use `cloneWithRows`.
+
+`sectionIdentities` is an array of identifiers for sections. ie. ['s1', 's2', ...]. The identifiers should correspond to the keys or array indexes of the data you wish to include. If not provided, it's assumed that the keys of dataBlob are the section identities.
+
+Note: this returns a new object!
+
+```
+const dataSource = ds.cloneWithRowsAndSections({
+ addresses: ['row 1', 'row 2'],
+ phone_numbers: ['data 1', 'data 2'],
+}, ['phone_numbers']);
+```
+
+---
+
+### `getRowCount()`
+
+```javascript
+getRowCount();
+```
+
+Returns the total number of rows in the data source.
+
+If you are specifying the rowIdentities or sectionIdentities, then `getRowCount` will return the number of rows in the filtered data source.
+
+---
+
+### `getRowAndSectionCount()`
+
+```javascript
+getRowAndSectionCount();
+```
+
+Returns the total number of rows in the data source (see `getRowCount` for how this is calculated) plus the number of sections in the data.
+
+If you are specifying the rowIdentities or sectionIdentities, then `getRowAndSectionCount` will return the number of rows & sections in the filtered data source.
+
+---
+
+### `rowShouldUpdate()`
+
+```javascript
+rowShouldUpdate(sectionIndex, rowIndex);
+```
+
+Returns if the row is dirtied and needs to be rerendered
+
+---
+
+### `getRowData()`
+
+```javascript
+getRowData(sectionIndex, rowIndex);
+```
+
+Gets the data required to render the row.
+
+---
+
+### `getRowIDForFlatIndex()`
+
+```javascript
+getRowIDForFlatIndex(index);
+```
+
+Gets the rowID at index provided if the dataSource arrays were flattened, or null of out of range indexes.
+
+---
+
+### `getSectionIDForFlatIndex()`
+
+```javascript
+getSectionIDForFlatIndex(index);
+```
+
+Gets the sectionID at index provided if the dataSource arrays were flattened, or null for out of range indexes.
+
+---
+
+### `getSectionLengths()`
+
+```javascript
+getSectionLengths();
+```
+
+Returns an array containing the number of rows in each section
+
+---
+
+### `sectionHeaderShouldUpdate()`
+
+```javascript
+sectionHeaderShouldUpdate(sectionIndex);
+```
+
+Returns if the section header is dirtied and needs to be rerendered
+
+---
+
+### `getSectionHeaderData()`
+
+```javascript
+getSectionHeaderData(sectionIndex);
+```
+
+Gets the data required to render the section header
diff --git a/docs/maintainers.md b/docs/maintainers.md
new file mode 100644
index 0000000..77934a5
--- /dev/null
+++ b/docs/maintainers.md
@@ -0,0 +1,158 @@
+---
+id: maintainers
+title: What to Expect from Maintainers
+---
+
+So you have read through the [contributor's guide](contributing.md) and you're getting ready to send your first pull request. Perhaps you've found an issue in React Native and want to work with the maintainers to land a fix. Here's what you can expect to happen when you open an issue or send a pull request.
+
+> The following is adapted from the excellent [Open Source Guide](https://opensource.guide/) from GitHub and reflects how the maintainers of React Native are encouraged to handle your contributions.
+
+## Handling Issues
+
+We see dozens of new issues being created every day. In order to help maintainers focus on what is actionable, maintainers ask contributors to do a bit of work prior to opening a new issue:
+
+* New issues should follow the [Issue Template](https://github.com/facebook/react-native/blob/master/.github/ISSUE_TEMPLATE.md).
+* Issues should provide clear, easy to follow steps alongside sample code to reproduce the issue. Ideally, provide a [Snack](http://snack.expo.io/).
+
+Issues that do not meet the above criteria can be closed immediately, with a link to the [contributor's guide](contributing.md).
+
+### New issue runbook
+
+You have gathered all the information required to open a new issue, and you are confident it meets the [contributor guidelines](contributing.md). Once you post an issue, this is what our maintainers will consider when deciding how to move forward:
+
+* **Is this issue a feature request?**
+
+ Some features may not be a good fit for the core React Native library. This is usually the case for \*_new modules_ that Facebook does not use in production. In this case, a maintainer will explain that this should be released to npm as a separate module, allowing users to easily pull in the module in their projects.
+
+ Even if the feature does belong in the core library, adding it means maintaining it. A maintainer will encourage you to submit a pull request or otherwise post your request to [Canny](https://react-native.canny.io/feature-requests).
+
+ An exception can be made for proposals and long-running discussions, though these should be rare. If you have been contributing to the project long enough, you will probably already have access to the [React Native Core Contributors](https://www.facebook.com/groups/reactnativeoss/) Facebook Group, where this sort of discussion is usually held.
+
+* **Is this issue a request for help?**
+
+ Questions should absolutely be asked on Stack Overflow rather than GitHub. Maintainers should encourage contributors to ask on Stack Overflow, before closing the issue. Feel free to also answer some [questions on Stack Overflow](https://stackoverflow.com/tags/react-native), you'll get rep!
+
+* **Was the [Issue Template](https://github.com/facebook/react-native/blob/master/.github/ISSUE_TEMPLATE.md) used to fill out the issue? Did the author answer Yes to both questions at the top?**
+
+ If not, the maintainer will ask you to provide more information by filling out the issue template, then they will close the issue.
+
+* **Is the issue a duplicate of an existing, open issue?**
+
+ A maintainer will add a comment, `Duplicate of #123`, which will mark the issue as a duplicate of issue #123. They will then close the issue.
+
+* **Does the issue include a Snack or list of steps to reproduce the issue?**
+
+ Issues should be relatively easy to reproduce. Sometimes the issue affects a particular app but a minimal repro is not provided, perhaps a crash is seen in the logs and the author is not sure where its coming from, maybe the issue is sporadic.
+
+ As it happens, if a maintainer cannot easily reproduce the issue, one cannot reasonably expect them to be able to work on a fix. The maintainer will let you know this is the case, and your issue will be closed.
+
+ Exceptions can be made if multiple people appear to be affected by the issue, especially right after a new React Native release is cut.
+
+* **Is the issue for an old release of React Native?**
+
+ If so, expect to be asked if the issue can be reproduced in the latest release candidate.
+
+* **Can the issue be reliably reproduced?**
+
+ Transient issues or issues that only occur on a specific project but a minimum repro is not provided may be closed.
+
+* **Does the issue need more information?**
+
+ Some issues need additional information in order to reproduce them. Maintainers should explain what additional information is needed, after adding the 'Needs more information' label.
+
+ Issues with the 'Needs more information' label that have been open for more than a week without a response from the author can be closed.
+
+* **Has the issue been resolved already in the comments?**
+
+ Sometimes another contributor has already provided a solution in the comments. Maintainers may close the issue in this case.
+
+> **Reopening a closed issue:** Sometimes it's necessary to reopen an issue. For example, if an issue was closed waiting for the author, then the author replied and it turns out this is indeed a bug, maintainers can reopen the issue.
+
+Valid bug reports with good repro steps are some of the best issues! Maintainers should thank the author for finding the issue, then explain that React Native is a community project and **ask them if they would be up for sending a fix**.
+
+### Triaging issues
+
+If a issue is still open after going through all of the checks above, it will move on to the triage stage. A maintainer will then do the following:
+
+1. Add relevant labels.
+2. Leave a comment saying the issue has been triaged.
+3. Tag the relevant people.
+
+You can generally figure out who may be relevant for a given issue by looking at the [CODEOWNERS](https://github.com/facebook/react-native/blob/master/.github/CODEOWNERS) file.
+
+### Stale issues
+
+Issues in the "Needs more information" state may be closed after a week with no followup from the author. Issues that have had no activity in the last two months may be closed periodically. If your issue gets closed in this manner, it's nothing personal. If you strongly believe that the issue should remain open, just let us know why.
+
+Simply commenting that the issue still exists is not very compelling (it's rare for critical, release blocking issues to have no activity for two months!). In order to make a good case for reopening the issue, you may need to do a bit of work:
+
+* Can the issue be reproduced on the latest release candidate? Post a comment with the version you tested.
+* If so, is there any information missing from the bug report? Post a comment with all the information required by the [issue template](https://github.com/facebook/react-native/blob/master/.github/ISSUE_TEMPLATE.md).
+* Is there a pull request that addressed this issue? Post a comment with the PR number so we can follow up.
+
+A couple of contributors making a good case may be all that is needed to reopen the issue.
+
+## Handling pull requests
+
+The core team will be monitoring for pull requests. When we get one, we'll run some Facebook-specific integration tests on it first. From here, we'll need to get another person to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
+
+### How we prioritize pull requests
+
+We use the [Contributors Chrome extension](https://github.com/hzoo/contributors-on-github) to help us understand who is sending a pull request. Pull requests opened by contributors that have a history of having their PRs merged are more likely to be looked at first. Aside from that, we try to go through pull requests on a chronological order.
+
+### How we review pull requests
+
+Reviewing a PR can sometimes require more time from a maintainer than it took you to write the code. Maintainers need to consider all the ramifications of importing your patch into the codebase. Does it potentially introduce breaking changes? What are the performance considerations of adding a new dependency? Will the docs need to be updated as well? Does this belong in core, or would it be a better fit as a third party package?
+
+Once you open a pull request, this is how you can expect maintainers to review it:
+
+* **Is the pull request missing information?**
+
+ A test plan is required! Add the labels 'Needs revision' and 'Needs response from author'. You can then follow up with a response like:
+
+ > Hey @author, thanks for sending the pull request. Can you please add all the info specified in the [template](https://github.com/facebook/react-native/blob/master/.github/PULL_REQUEST_TEMPLATE.md)? This is necessary for people to be able to understand and review your pull request.
+
+* **Does the code style match the [Style guide](contributing.md#style-guide)?**
+
+ If not, link to the style guide and add the label 'Needs revision'.
+
+* **Does the pull request add a completely new feature we don't want to add to the core and maintain?**
+
+ Ask the author to release it a separate npm module and close the pull request.
+
+* **Does the pull request do several unrelated things at the same time?**
+
+ Ask the author to split it.
+
+* **Is the pull request old and need rebasing?**
+
+ Ask the author "Can you rebase please?" and add the label 'Needs response from author'.
+
+* **Is a pull request waiting for a response from author?**
+
+ Pull requests like these usually have the label 'Needs response from author'. If there has been no reply in the last 30 days, close it with a response like the following:
+
+ > Thanks for making the pull request, but we are closing it due to inactivity. If you want to get your proposed changes merged, please rebase your branch with master and send a new pull request.
+
+* **Is the pull request old and waiting for review?**
+
+ Review it or cc someone who might be able to review. Finding the right person to review a pull request can sometimes be tricky. A pull request may simultaneously touch iOS, Java, and JavaScript code. If a pull request has been waiting for review for a while, you can help out by looking at the blame history for the files you're touching. Is there anyone that appears to be knowledgeable in the part of the codebase the PR is touching?
+
+### Closing pull requests
+
+Sometimes a maintainer may decide that a pull request will not be accepted. Maybe the pull request is out of scope for the project, or the idea is good but the implementation is poor. Whatever the reason, when closing a pull request maintainers should keep the conversation friendly:
+
+* **Thank** them for their contribution.
+* **Explain why** it doesn't fit into the scope of the project.
+* **Link to relevant documentation**, if you have it.
+* **Close** the request.
+
+## Defusing situations
+
+Sometimes when a maintainer says no to a pull request or close an issue, a contributor may get upset and criticize your decision. Maintainers will take steps to defuse the situation.
+
+If a contributor becomes hostile or disrespectful, they will be referred to the [Code of Conduct](https://code.facebook.com/codeofconduct). Negative users will be blocked, and inappropriate comments will be deleted.
+
+## Facebook GitHub Bot
+
+The Facebook GitHub Bot was used to allow members of the community to perform administrative actions such as labeling and closing issues. The bot is no longer necessary, as maintainers will be granted the necessary permissions to manage issues. If you are interested in maintaining the repo, please reach out to Héctor Ramos (@hramos) on GitHub.
diff --git a/docs/maskedviewios.md b/docs/maskedviewios.md
new file mode 100644
index 0000000..aefba2c
--- /dev/null
+++ b/docs/maskedviewios.md
@@ -0,0 +1,71 @@
+---
+id: maskedviewios
+title: MaskedViewIOS
+---
+
+Renders the child view with a mask specified in the `maskElement` prop.
+
+## Example
+
+```javascript
+import React from 'react';
+import {MaskedViewIOS, Text, View} from 'react-native';
+
+class MyMaskedView extends React.Component {
+ render() {
+ return (
+ // Determines shape of the mask
+
+
+ Basic Mask
+
+
+ }>
+ {/* Shows behind the mask, you can put anything here, such as an image */}
+
+
+
+
+ );
+ }
+}
+```
+
+The following image demonstrates that you can put almost anything behind the mask. The three examples shown are masked ``, ``, and ``.
+
+
+
+**The alpha channel of the view rendered by the `maskElement` prop determines how much of the view's content and background shows through.** Fully or partially opaque pixels allow the underlying content to show through but fully transparent pixels block that content.
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`maskElement`](maskedviewios.md#maskelement)
+
+---
+
+# Reference
+
+## Props
+
+### `maskElement`
+
+| Type | Required |
+| ------- | -------- |
+| element | Yes |
diff --git a/docs/modal.md b/docs/modal.md
new file mode 100644
index 0000000..bdfa536
--- /dev/null
+++ b/docs/modal.md
@@ -0,0 +1,195 @@
+---
+id: modal
+title: Modal
+---
+
+The Modal component is a simple way to present content above an enclosing view.
+
+> Note: If you need more control over how to present modals over the rest of your app, then consider using a top-level Navigator.
+
+```javascript
+import React, {Component} from 'react';
+import {Modal, Text, TouchableHighlight, View, Alert} from 'react-native';
+
+class ModalExample extends Component {
+ state = {
+ modalVisible: false,
+ };
+
+ setModalVisible(visible) {
+ this.setState({modalVisible: visible});
+ }
+
+ render() {
+ return (
+
+ {
+ Alert.alert('Modal has been closed.');
+ }}>
+
+
+ Hello World!
+
+ {
+ this.setModalVisible(!this.state.modalVisible);
+ }}>
+ Hide Modal
+
+
+
+
+
+ {
+ this.setModalVisible(true);
+ }}>
+ Show Modal
+
+
+ );
+ }
+}
+```
+
+### Props
+
+* [`visible`](modal.md#visible)
+* [`supportedOrientations`](modal.md#supportedorientations)
+* [`onRequestClose`](modal.md#onrequestclose)
+* [`onShow`](modal.md#onshow)
+* [`transparent`](modal.md#transparent)
+* [`animationType`](modal.md#animationtype)
+* [`hardwareAccelerated`](modal.md#hardwareaccelerated)
+* [`onDismiss`](modal.md#ondismiss)
+* [`onOrientationChange`](modal.md#onorientationchange)
+* [`presentationStyle`](modal.md#presentationstyle)
+* [`animated`](modal.md#animated)
+
+---
+
+# Reference
+
+## Props
+
+### `visible`
+
+The `visible` prop determines whether your modal is visible.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `supportedOrientations`
+
+The `supportedOrientations` prop allows the modal to be rotated to any of the specified orientations. On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field. When using `presentationStyle` of `pageSheet` or `formSheet`, this property will be ignored by iOS.
+
+| Type | Required | Platform |
+| --------------------------------------------------------------------------------------------------- | -------- | -------- |
+| array of enum('portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right') | No | iOS |
+
+---
+
+### `onRequestClose`
+
+The `onRequestClose` callback is called when the user taps the hardware back button on Android or the menu button on Apple TV. Because of this required prop, be aware that `BackHandler` events will not be emitted as long as the modal is open.
+
+| Type | Required | Platform |
+| -------- | -------- | ------------------------ |
+| function | Yes | Android, Platform.isTVOS |
+| function | No | (Others) |
+
+---
+
+### `onShow`
+
+The `onShow` prop allows passing a function that will be called once the modal has been shown.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `transparent`
+
+The `transparent` prop determines whether your modal will fill the entire view. Setting this to `true` will render the modal over a transparent background.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `animationType`
+
+The `animationType` prop controls how the modal animates.
+
+* `slide` slides in from the bottom
+* `fade` fades into view
+* `none` appears without an animation
+
+Default is set to `none`.
+
+| Type | Required |
+| ----------------------------- | -------- |
+| enum('none', 'slide', 'fade') | No |
+
+---
+
+### `hardwareAccelerated`
+
+The `hardwareAccelerated` prop controls whether to force hardware acceleration for the underlying window.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `onDismiss`
+
+The `onDismiss` prop allows passing a function that will be called once the modal has been dismissed.
+
+| Type | Required | Platform |
+| -------- | -------- | -------- |
+| function | No | iOS |
+
+---
+
+### `onOrientationChange`
+
+The `onOrientationChange` callback is called when the orientation changes while the modal is being displayed. The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation.
+
+| Type | Required | Platform |
+| -------- | -------- | -------- |
+| function | No | iOS |
+
+---
+
+### `presentationStyle`
+
+The `presentationStyle` prop controls how the modal appears (generally on larger devices such as iPad or plus-sized iPhones). See https://developer.apple.com/reference/uikit/uimodalpresentationstyle for details.
+
+* `fullScreen` covers the screen completely
+* `pageSheet` covers portrait-width view centered (only on larger devices)
+* `formSheet` covers narrow-width view centered (only on larger devices)
+* `overFullScreen` covers the screen completely, but allows transparency
+
+Default is set to `overFullScreen` or `fullScreen` depending on `transparent` property.
+
+| Type | Required | Platform |
+| -------------------------------------------------------------- | -------- | -------- |
+| enum('fullScreen', 'pageSheet', 'formSheet', 'overFullScreen') | No | iOS |
+
+---
+
+### `animated`
+
+Deprecated. Use the `animationType` prop instead.
diff --git a/docs/more-resources.md b/docs/more-resources.md
new file mode 100644
index 0000000..66997f7
--- /dev/null
+++ b/docs/more-resources.md
@@ -0,0 +1,43 @@
+---
+id: more-resources
+title: More Resources
+---
+
+If you just read through this website, you should be able to build a pretty cool React Native app. But React Native isn't just a product made by one company - it's a community of thousands of developers. So if you're interested in React Native, here's some related stuff you might want to check out.
+
+## Popular Libraries
+
+If you're using React Native, you probably already know about [React](https://facebook.github.io/react/). So I feel a bit silly mentioning this. But if you haven't, check out React - it's the best way to build a modern website.
+
+One common question is how to handle the "state" of your React Native application. The most popular library for this is [Redux](http://redux.js.org/). Don't be afraid of how often Redux uses the word "reducer" - it's a pretty simple library, and there's also a nice [series of videos](https://egghead.io/courses/getting-started-with-redux) explaining it.
+
+If you're looking for a library that does a specific thing, check out [Awesome React Native](http://www.awesome-react-native.com/), a curated list of components that also has demos, articles, and other stuff.
+
+## Examples
+
+Try out apps from the [Showcase](/react-native/showcase.html) to see what React Native is capable of! There are also some [example apps on GitHub](https://github.com/ReactNativeNews/React-Native-Apps). You can run the apps on a simulator or device, and you can see the source code for these apps, which is neat.
+
+The folks who built the app for Facebook's F8 conference also [open-sourced the code](https://github.com/fbsamples/f8app) and wrote up a [detailed series of tutorials](http://makeitopen.com/). This is useful if you want a more in-depth example that's more realistic than most sample apps out there.
+
+## Extending React Native
+
+* Fellow developers write and publish React Native modules to npm and open source them on GitHub.
+* Making modules helps grow the React Native ecosystem and community. We recommend writing modules for your use cases and sharing them on npm.
+* Read the guides on Native Modules ([iOS](native-modules-ios.md), [Android](native-modules-android.md)) and Native UI Components ([iOS](native-components-ios.md), [Android](native-components-android.md)) if you are interested in extending native functionality.
+* Looking for a pre-built component? Check [JS.coach](https://js.coach/react-native) or [Native Directory](https://native.directory/) to find what the community has been creating.
+
+## Development Tools
+
+[Nuclide](https://nuclide.io/) is the IDE that Facebook uses internally for JavaScript development. The killer feature of Nuclide is its debugging ability. It also has great inline Flow support. [VS Code](https://code.visualstudio.com/) is another IDE that is popular with JavaScript developers.
+
+[Ignite](https://github.com/infinitered/ignite) is a starter kit that uses Redux and a few different common UI libraries. It has a CLI to generate apps, components, and containers. If you like all of the individual tech choices, Ignite could be perfect for you.
+
+[App Center](https://appcenter.ms/) is a service from Microsoft that makes it easy to deploy live updates to your React Native app. If you don't like going through the app store process to deploy little tweaks, and you also don't like setting up your own backend, give App Center a try.
+
+[Expo](https://docs.expo.io) is a development environment plus application that focuses on letting you build React Native apps in the Expo development environment, without ever touching Xcode or Android Studio. If you wish React Native was even more JavaScripty and webby, check out Expo.
+
+[Yoga](https://yogalayout.com/) is a stand-alone layout engine that extends beyond React Native and allows product engineers to build layouts quickly for multiple platforms with a highly optimized open source layout engine designed with speed, size, and ease of use in mind.
+
+[Bugsnag](https://www.bugsnag.com/), [Microsoft App Center](https://appcenter.ms/), and [Sentry](https://sentry.io/welcome/) all provide excellent crash and error monitoring services for React and React Native apps. These services allow you to proactively monitor crashes and issues occuring on your apps in real time so you can fix them quickly and improve user experience.
+
+The [React Developer Tools](debugging.md#react-developer-tools) are great for debugging React and React Native apps.
diff --git a/docs/native-components-android.md b/docs/native-components-android.md
new file mode 100644
index 0000000..622fe71
--- /dev/null
+++ b/docs/native-components-android.md
@@ -0,0 +1,183 @@
+---
+id: native-components-android
+title: Native UI Components
+---
+
+There are tons of native UI widgets out there ready to be used in the latest apps - some of them are part of the platform, others are available as third-party libraries, and still more might be in use in your very own portfolio. React Native has several of the most critical platform components already wrapped, like `ScrollView` and `TextInput`, but not all of them, and certainly not ones you might have written yourself for a previous app. Fortunately, it's quite easy to wrap up these existing components for seamless integration with your React Native application.
+
+Like the native module guide, this too is a more advanced guide that assumes you are somewhat familiar with Android SDK programming. This guide will show you how to build a native UI component, walking you through the implementation of a subset of the existing `ImageView` component available in the core React Native library.
+
+## ImageView example
+
+For this example we are going to walk through the implementation requirements to allow the use of ImageViews in JavaScript.
+
+Native views are created and manipulated by extending `ViewManager` or more commonly `SimpleViewManager` . A `SimpleViewManager` is convenient in this case because it applies common properties such as background color, opacity, and Flexbox layout.
+
+These subclasses are essentially singletons - only one instance of each is created by the bridge. They vend native views to the `NativeViewHierarchyManager`, which delegates back to them to set and update the properties of the views as necessary. The `ViewManagers` are also typically the delegates for the views, sending events back to JavaScript via the bridge.
+
+Vending a view is simple:
+
+1. Create the ViewManager subclass.
+2. Implement the `createViewInstance` method
+3. Expose view property setters using `@ReactProp` (or `@ReactPropGroup`) annotation
+4. Register the manager in `createViewManagers` of the applications package.
+5. Implement the JavaScript module
+
+## 1. Create the `ViewManager` subclass
+
+In this example we create view manager class `ReactImageManager` that extends `SimpleViewManager` of type `ReactImageView`. `ReactImageView` is the type of object managed by the manager, this will be the custom native view. Name returned by `getName` is used to reference the native view type from JavaScript.
+
+```java
+...
+
+public class ReactImageManager extends SimpleViewManager {
+
+ public static final String REACT_CLASS = "RCTImageView";
+
+ @Override
+ public String getName() {
+ return REACT_CLASS;
+ }
+```
+
+## 2. Implement method `createViewInstance`
+
+Views are created in the `createViewInstance` method, the view should initialize itself in its default state, any properties will be set via a follow up call to `updateView.`
+
+```java
+ @Override
+ public ReactImageView createViewInstance(ThemedReactContext context) {
+ return new ReactImageView(context, Fresco.newDraweeControllerBuilder(), mCallerContext);
+ }
+```
+
+## 3. Expose view property setters using `@ReactProp` (or `@ReactPropGroup`) annotation
+
+Properties that are to be reflected in JavaScript needs to be exposed as setter method annotated with `@ReactProp` (or `@ReactPropGroup`). Setter method should take view to be updated (of the current view type) as a first argument and property value as a second argument. Setter should be declared as a `void` method and should be `public`. Property type sent to JS is determined automatically based on the type of value argument of the setter. The following type of values are currently supported: `boolean`, `int`, `float`, `double`, `String`, `Boolean`, `Integer`, `ReadableArray`, `ReadableMap`.
+
+Annotation `@ReactProp` has one obligatory argument `name` of type `String`. Name assigned to the `@ReactProp` annotation linked to the setter method is used to reference the property on JS side.
+
+Except from `name`, `@ReactProp` annotation may take following optional arguments: `defaultBoolean`, `defaultInt`, `defaultFloat`. Those arguments should be of the corresponding primitive type (accordingly `boolean`, `int`, `float`) and the value provided will be passed to the setter method in case when the property that the setter is referencing has been removed from the component. Note that "default" values are only provided for primitive types, in case when setter is of some complex type, `null` will be provided as a default value in case when corresponding property gets removed.
+
+Setter declaration requirements for methods annotated with `@ReactPropGroup` are different than for `@ReactProp`, please refer to the `@ReactPropGroup` annotation class docs for more information about it.
+
+**IMPORTANT!** in ReactJS updating the property value will result in setter method call. Note that one of the ways we can update component is by removing properties that have been set before. In that case setter method will be called as well to notify view manager that property has changed. In that case "default" value will be provided (for primitive types "default" can value can be specified using `defaultBoolean`, `defaultFloat`, etc. arguments of `@ReactProp` annotation, for complex types setter will be called with value set to `null`).
+
+```java
+ @ReactProp(name = "src")
+ public void setSrc(ReactImageView view, @Nullable ReadableArray sources) {
+ view.setSource(sources);
+ }
+
+ @ReactProp(name = "borderRadius", defaultFloat = 0f)
+ public void setBorderRadius(ReactImageView view, float borderRadius) {
+ view.setBorderRadius(borderRadius);
+ }
+
+ @ReactProp(name = ViewProps.RESIZE_MODE)
+ public void setResizeMode(ReactImageView view, @Nullable String resizeMode) {
+ view.setScaleType(ImageResizeMode.toScaleType(resizeMode));
+ }
+```
+
+## 4. Register the `ViewManager`
+
+The final Java step is to register the ViewManager to the application, this happens in a similar way to [Native Modules](native-modules-android.md), via the applications package member function `createViewManagers.`
+
+```java
+ @Override
+ public List createViewManagers(
+ ReactApplicationContext reactContext) {
+ return Arrays.asList(
+ new ReactImageManager()
+ );
+ }
+```
+
+## 5. Implement the JavaScript module
+
+The very final step is to create the JavaScript module that defines the interface layer between Java and JavaScript for the users of your new view. It is recommended for you to document the component interface in this module (e.g. using Flow, TypeScript, or plain old comments).
+
+```javascript
+// ImageView.js
+
+import {requireNativeComponent} from 'react-native';
+
+/**
+ * Composes `View`.
+ *
+ * - src: string
+ * - borderRadius: number
+ * - resizeMode: 'cover' | 'contain' | 'stretch'
+ */
+module.exports = requireNativeComponent('RCTImageView');
+```
+
+The `requireNativeComponent` function takes the name of the native view. Note that if your component needs to do anything more sophisticated (e.g. custom event handling), you should wrap the native component in another React component. This is illustrated in the `MyCustomView` example below.
+
+# Events
+
+So now we know how to expose native view components that we can control easily from JS, but how do we deal with events from the user, like pinch-zooms or panning? When a native event occurs the native code should issue an event to the JavaScript representation of the View, and the two views are linked with the value returned from the `getId()` method.
+
+```java
+class MyCustomView extends View {
+ ...
+ public void onReceiveNativeEvent() {
+ WritableMap event = Arguments.createMap();
+ event.putString("message", "MyMessage");
+ ReactContext reactContext = (ReactContext)getContext();
+ reactContext.getJSModule(RCTEventEmitter.class).receiveEvent(
+ getId(),
+ "topChange",
+ event);
+ }
+}
+```
+
+To map the `topChange` event name to the `onChange` callback prop in JavaScript, register it by overriding the `getExportedCustomBubblingEventTypeConstants` method in your `ViewManager`:
+
+```java
+public class ReactImageManager extends SimpleViewManager {
+ ...
+ public Map getExportedCustomBubblingEventTypeConstants() {
+ return MapBuilder.builder()
+ .put(
+ "topChange",
+ MapBuilder.of(
+ "phasedRegistrationNames",
+ MapBuilder.of("bubbled", "onChange")))
+ .build();
+ }
+}
+```
+
+This callback is invoked with the raw event, which we typically process in the wrapper component to make a simpler API:
+
+```javascript
+// MyCustomView.js
+
+class MyCustomView extends React.Component {
+ constructor(props) {
+ super(props);
+ this._onChange = this._onChange.bind(this);
+ }
+ _onChange(event: Event) {
+ if (!this.props.onChangeMessage) {
+ return;
+ }
+ this.props.onChangeMessage(event.nativeEvent.message);
+ }
+ render() {
+ return ;
+ }
+}
+MyCustomView.propTypes = {
+ /**
+ * Callback that is called continuously when the user is dragging the map.
+ */
+ onChangeMessage: PropTypes.func,
+ ...
+};
+
+var RCTMyCustomView = requireNativeComponent(`RCTMyCustomView`);
+```
diff --git a/docs/native-components-ios.md b/docs/native-components-ios.md
new file mode 100644
index 0000000..6541f00
--- /dev/null
+++ b/docs/native-components-ios.md
@@ -0,0 +1,438 @@
+---
+id: native-components-ios
+title: Native UI Components
+---
+
+There are tons of native UI widgets out there ready to be used in the latest apps - some of them are part of the platform, others are available as third-party libraries, and still more might be in use in your very own portfolio. React Native has several of the most critical platform components already wrapped, like `ScrollView` and `TextInput`, but not all of them, and certainly not ones you might have written yourself for a previous app. Fortunately, it's quite easy to wrap up these existing components for seamless integration with your React Native application.
+
+Like the native module guide, this too is a more advanced guide that assumes you are somewhat familiar with iOS programming. This guide will show you how to build a native UI component, walking you through the implementation of a subset of the existing `MapView` component available in the core React Native library.
+
+## iOS MapView example
+
+Let's say we want to add an interactive Map to our app - might as well use [`MKMapView`](https://developer.apple.com/library/prerelease/mac/documentation/MapKit/Reference/MKMapView_Class/index.html), we just need to make it usable from JavaScript.
+
+Native views are created and manipulated by subclasses of `RCTViewManager`. These subclasses are similar in function to view controllers, but are essentially singletons - only one instance of each is created by the bridge. They expose native views to the `RCTUIManager`, which delegates back to them to set and update the properties of the views as necessary. The `RCTViewManager`s are also typically the delegates for the views, sending events back to JavaScript via the bridge.
+
+Exposing a view is simple:
+
+* Subclass `RCTViewManager` to create a manager for your component.
+* Add the `RCT_EXPORT_MODULE()` marker macro.
+* Implement the `-(UIView *)view` method.
+
+```objectivec
+// RNTMapManager.m
+#import
+
+#import
+
+@interface RNTMapManager : RCTViewManager
+@end
+
+@implementation RNTMapManager
+
+RCT_EXPORT_MODULE(RNTMap)
+
+- (UIView *)view
+{
+ return [[MKMapView alloc] init];
+}
+
+@end
+```
+
+**Note:** Do not attempt to set the `frame` or `backgroundColor` properties on the `UIView` instance that you expose through the `-view` method. React Native will overwrite the values set by your custom class in order to match your JavaScript component's layout props. If you need this granularity of control it might be better to wrap the `UIView` instance you want to style in another `UIView` and return the wrapper `UIView` instead. See [Issue 2948](https://github.com/facebook/react-native/issues/2948) for more context.
+
+> In the example above, we prefixed our class name with `RNT`. Prefixes are used to avoid name collisions with other frameworks. Apple frameworks use two-letter prefixes, and React Native uses `RCT` as a prefix. In order to avoid name collisions, we recommend using a three-letter prefix other than `RCT` in your own classes.
+
+Then you just need a little bit of JavaScript to make this a usable React component:
+
+```javascript
+// MapView.js
+
+import { requireNativeComponent } from 'react-native';
+
+// requireNativeComponent automatically resolves 'RNTMap' to 'RNTMapManager'
+module.exports = requireNativeComponent('RNTMap', null);
+
+// MyApp.js
+
+import MapView from './MapView.js';
+
+...
+
+render() {
+ return ;
+}
+```
+
+Make sure to use `RNTMap` here. We want to require the manager here, which will expose the view of our manager for use in Javascript.
+
+**Note:** When rendering, don't forget to stretch the view, otherwise you'll be staring at a blank screen.
+
+```javascript
+ render() {
+ return ;
+ }
+```
+
+This is now a fully-functioning native map view component in JavaScript, complete with pinch-zoom and other native gesture support. We can't really control it from JavaScript yet, though :(
+
+## Properties
+
+The first thing we can do to make this component more usable is to bridge over some native properties. Let's say we want to be able to disable zooming and specify the visible region. Disabling zoom is a simple boolean, so we add this one line:
+
+```objectivec
+// RNTMapManager.m
+RCT_EXPORT_VIEW_PROPERTY(zoomEnabled, BOOL)
+```
+
+Note that we explicitly specify the type as `BOOL` - React Native uses `RCTConvert` under the hood to convert all sorts of different data types when talking over the bridge, and bad values will show convenient "RedBox" errors to let you know there is an issue ASAP. When things are straightforward like this, the whole implementation is taken care of for you by this macro.
+
+Now to actually disable zooming, we set the property in JS:
+
+```javascript
+// MyApp.js
+
+```
+
+To document the properties (and which values they accept) of our MapView component we'll add a wrapper component and document the interface with React `PropTypes`:
+
+```javascript
+// MapView.js
+import PropTypes from 'prop-types';
+import React from 'react';
+import {requireNativeComponent} from 'react-native';
+
+class MapView extends React.Component {
+ render() {
+ return ;
+ }
+}
+
+MapView.propTypes = {
+ /**
+ * A Boolean value that determines whether the user may use pinch
+ * gestures to zoom in and out of the map.
+ */
+ zoomEnabled: PropTypes.bool,
+};
+
+var RNTMap = requireNativeComponent('RNTMap', MapView);
+
+module.exports = MapView;
+```
+
+Now we have a nicely documented wrapper component that is easy to work with. Note that we changed `requireNativeComponent`'s second argument from `null` to the new `MapView` wrapper component. This allows the infrastructure to verify that the propTypes match the native props in order to reduce the chances of mismatches between the Objective-C and JavaScript code.
+
+Next, let's add the more complex `region` prop. We start by adding the native code:
+
+```objectivec
+// RNTMapManager.m
+RCT_CUSTOM_VIEW_PROPERTY(region, MKCoordinateRegion, MKMapView)
+{
+ [view setRegion:json ? [RCTConvert MKCoordinateRegion:json] : defaultView.region animated:YES];
+}
+```
+
+Ok, this is more complicated than the simple `BOOL` case we had before. Now we have a `MKCoordinateRegion` type that needs a conversion function, and we have custom code so that the view will animate when we set the region from JS. Within the function body that we provide, `json` refers to the raw value that has been passed from JS. There is also a `view` variable which gives us access to the manager's view instance, and a `defaultView` that we use to reset the property back to the default value if JS sends us a null sentinel.
+
+You could write any conversion function you want for your view - here is the implementation for `MKCoordinateRegion` via a category on `RCTConvert`. It uses an already existing category of ReactNative `RCTConvert+CoreLocation`:
+
+```objectivec
+// RNTMapManager.m
+
+#import "RCTConvert+Mapkit.m"
+
+// RCTConvert+Mapkit.h
+
+#import
+#import
+#import
+#import
+
+@interface RCTConvert (Mapkit)
+
++ (MKCoordinateSpan)MKCoordinateSpan:(id)json;
++ (MKCoordinateRegion)MKCoordinateRegion:(id)json;
+
+@end
+
+@implementation RCTConvert(MapKit)
+
++ (MKCoordinateSpan)MKCoordinateSpan:(id)json
+{
+ json = [self NSDictionary:json];
+ return (MKCoordinateSpan){
+ [self CLLocationDegrees:json[@"latitudeDelta"]],
+ [self CLLocationDegrees:json[@"longitudeDelta"]]
+ };
+}
+
++ (MKCoordinateRegion)MKCoordinateRegion:(id)json
+{
+ return (MKCoordinateRegion){
+ [self CLLocationCoordinate2D:json],
+ [self MKCoordinateSpan:json]
+ };
+}
+
+@end
+```
+
+These conversion functions are designed to safely process any JSON that the JS might throw at them by displaying "RedBox" errors and returning standard initialization values when missing keys or other developer errors are encountered.
+
+To finish up support for the `region` prop, we need to document it in `propTypes` (or we'll get an error that the native prop is undocumented), then we can set it just like any other prop:
+
+```javascript
+// MapView.js
+
+MapView.propTypes = {
+ /**
+ * A Boolean value that determines whether the user may use pinch
+ * gestures to zoom in and out of the map.
+ */
+ zoomEnabled: PropTypes.bool,
+
+ /**
+ * The region to be displayed by the map.
+ *
+ * The region is defined by the center coordinates and the span of
+ * coordinates to display.
+ */
+ region: PropTypes.shape({
+ /**
+ * Coordinates for the center of the map.
+ */
+ latitude: PropTypes.number.isRequired,
+ longitude: PropTypes.number.isRequired,
+
+ /**
+ * Distance between the minimum and the maximum latitude/longitude
+ * to be displayed.
+ */
+ latitudeDelta: PropTypes.number.isRequired,
+ longitudeDelta: PropTypes.number.isRequired,
+ }),
+};
+
+// MyApp.js
+
+render() {
+ var region = {
+ latitude: 37.48,
+ longitude: -122.16,
+ latitudeDelta: 0.1,
+ longitudeDelta: 0.1,
+ };
+ return (
+
+ );
+}
+```
+
+Here you can see that the shape of the region is explicit in the JS documentation - ideally we could codegen some of this stuff, but that's not happening yet.
+
+Sometimes your native component will have some special properties that you don't want to be part of the API for the associated React component. For example, `Switch` has a custom `onChange` handler for the raw native event, and exposes an `onValueChange` handler property that is invoked with just the boolean value rather than the raw event. Since you don't want these native only properties to be part of the API, you don't want to put them in `propTypes`, but if you don't you'll get an error. The solution is simply to add them to the `nativeOnly` option, e.g.
+
+```javascript
+var RCTSwitch = requireNativeComponent('RCTSwitch', Switch, {
+ nativeOnly: {onChange: true},
+});
+```
+
+## Events
+
+So now we have a native map component that we can control easily from JS, but how do we deal with events from the user, like pinch-zooms or panning to change the visible region?
+
+Until now we've just returned a `MKMapView` instance from our manager's `-(UIView *)view` method. We can't add new properties to `MKMapView` so we have to create a new subclass from `MKMapView` which we use for our View. We can then add a `onRegionChange` callback on this subclass:
+
+```objectivec
+// RNTMapView.h
+
+#import
+
+#import
+
+@interface RNTMapView: MKMapView
+
+@property (nonatomic, copy) RCTBubblingEventBlock onRegionChange;
+
+@end
+
+// RNTMapView.m
+
+#import "RNTMapView.h"
+
+@implementation RNTMapView
+
+@end
+```
+
+Note that all `RCTBubblingEventBlock` must be prefixed with `on`. Next, declare an event handler property on `RNTMapManager`, make it a delegate for all the views it exposes, and forward events to JS by calling the event handler block from the native view.
+
+```objectivec{9,17,31-48}
+// RNTMapManager.m
+
+#import
+#import
+
+#import "RNTMapView.h"
+#import "RCTConvert+Mapkit.m"
+
+@interface RNTMapManager : RCTViewManager
+@end
+
+@implementation RNTMapManager
+
+RCT_EXPORT_MODULE()
+
+RCT_EXPORT_VIEW_PROPERTY(zoomEnabled, BOOL)
+RCT_EXPORT_VIEW_PROPERTY(onRegionChange, RCTBubblingEventBlock)
+
+RCT_CUSTOM_VIEW_PROPERTY(region, MKCoordinateRegion, MKMapView)
+{
+ [view setRegion:json ? [RCTConvert MKCoordinateRegion:json] : defaultView.region animated:YES];
+}
+
+- (UIView *)view
+{
+ RNTMapView *map = [RNTMapView new];
+ map.delegate = self;
+ return map;
+}
+
+#pragma mark MKMapViewDelegate
+
+- (void)mapView:(RNTMapView *)mapView regionDidChangeAnimated:(BOOL)animated
+{
+ if (!mapView.onRegionChange) {
+ return;
+ }
+
+ MKCoordinateRegion region = mapView.region;
+ mapView.onRegionChange(@{
+ @"region": @{
+ @"latitude": @(region.center.latitude),
+ @"longitude": @(region.center.longitude),
+ @"latitudeDelta": @(region.span.latitudeDelta),
+ @"longitudeDelta": @(region.span.longitudeDelta),
+ }
+ });
+}
+@end
+```
+
+In the delegate method `-mapView:regionDidChangeAnimated:` the event handler block is called on the corresponding view with the region data. Calling the `onRegionChange` event handler block results in calling the same callback prop in JavaScript. This callback is invoked with the raw event, which we typically process in the wrapper component to make a simpler API:
+
+```javascript
+// MapView.js
+
+class MapView extends React.Component {
+ _onRegionChange = (event) => {
+ if (!this.props.onRegionChange) {
+ return;
+ }
+
+ // process raw event...
+ this.props.onRegionChange(event.nativeEvent);
+ }
+ render() {
+ return (
+
+ );
+ }
+}
+MapView.propTypes = {
+ /**
+ * Callback that is called continuously when the user is dragging the map.
+ */
+ onRegionChange: PropTypes.func,
+ ...
+};
+
+// MyApp.js
+
+class MyApp extends React.Component {
+ onRegionChange(event) {
+ // Do stuff with event.region.latitude, etc.
+ }
+
+ render() {
+ var region = {
+ latitude: 37.48,
+ longitude: -122.16,
+ latitudeDelta: 0.1,
+ longitudeDelta: 0.1,
+ };
+ return (
+
+ );
+ }
+}
+```
+
+## Styles
+
+Since all our native react views are subclasses of `UIView`, most style attributes will work like you would expect out of the box. Some components will want a default style, however, for example `UIDatePicker` which is a fixed size. This default style is important for the layout algorithm to work as expected, but we also want to be able to override the default style when using the component. `DatePickerIOS` does this by wrapping the native component in an extra view, which has flexible styling, and using a fixed style (which is generated with constants passed in from native) on the inner native component:
+
+```javascript
+// DatePickerIOS.ios.js
+
+import { UIManager } from 'react-native';
+var RCTDatePickerIOSConsts = UIManager.RCTDatePicker.Constants;
+...
+ render: function() {
+ return (
+
+
+
+ );
+ }
+});
+
+var styles = StyleSheet.create({
+ rkDatePickerIOS: {
+ height: RCTDatePickerIOSConsts.ComponentHeight,
+ width: RCTDatePickerIOSConsts.ComponentWidth,
+ },
+});
+```
+
+The `RCTDatePickerIOSConsts` constants are exported from native by grabbing the actual frame of the native component like so:
+
+```objectivec
+// RCTDatePickerManager.m
+
+- (NSDictionary *)constantsToExport
+{
+ UIDatePicker *dp = [[UIDatePicker alloc] init];
+ [dp layoutIfNeeded];
+
+ return @{
+ @"ComponentHeight": @(CGRectGetHeight(dp.frame)),
+ @"ComponentWidth": @(CGRectGetWidth(dp.frame)),
+ @"DatePickerModes": @{
+ @"time": @(UIDatePickerModeTime),
+ @"date": @(UIDatePickerModeDate),
+ @"datetime": @(UIDatePickerModeDateAndTime),
+ }
+ };
+}
+```
+
+This guide covered many of the aspects of bridging over custom native components, but there is even more you might need to consider, such as custom hooks for inserting and laying out subviews. If you want to go even deeper, check out the [source code](https://github.com/facebook/react-native/blob/master/React/Views) of some of the implemented components.
diff --git a/docs/native-modules-android.md b/docs/native-modules-android.md
new file mode 100644
index 0000000..7e72693
--- /dev/null
+++ b/docs/native-modules-android.md
@@ -0,0 +1,469 @@
+---
+id: native-modules-android
+title: Native Modules
+---
+
+Sometimes an app needs access to a platform API that React Native doesn't have a corresponding module for yet. Maybe you want to reuse some existing Java code without having to reimplement it in JavaScript, or write some high performance, multi-threaded code such as for image processing, a database, or any number of advanced extensions.
+
+We designed React Native such that it is possible for you to write real native code and have access to the full power of the platform. This is a more advanced feature and we don't expect it to be part of the usual development process, however it is essential that it exists. If React Native doesn't support a native feature that you need, you should be able to build it yourself.
+
+## Native Module Setup
+
+Native modules are usually distributed as npm packages, apart from the typical javascript files and resources they will contain an Android library project. This project is, from NPM's perspective just like any other media asset, meaning there isn't anything special about it from this point of view. To get the basic scaffolding make sure to read [Native Modules Setup](native-modules-setup) guide first.
+
+### Enable Gradle
+
+If you plan to make changes in Java code, we recommend enabling [Gradle Daemon](https://docs.gradle.org/2.9/userguide/gradle_daemon.html) to speed up builds.
+
+## The Toast Module
+
+This guide will use the [Toast](http://developer.android.com/reference/android/widget/Toast.html) example. Let's say we would like to be able to create a toast message from JavaScript.
+
+We start by creating a native module. A native module is a Java class that usually extends the `ReactContextBaseJavaModule` class and implements the functionality required by the JavaScript. Our goal here is to be able to write `ToastExample.show('Awesome', ToastExample.SHORT);` from JavaScript to display a short toast on the screen.
+
+create a new Java Class named `ToastModule.java` inside `android/app/src/main/java/com/your-app-name/` folder with the content below:
+
+```java
+// ToastModule.java
+
+package com.your-app-name;
+
+import android.widget.Toast;
+
+import com.facebook.react.bridge.NativeModule;
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.react.bridge.ReactContext;
+import com.facebook.react.bridge.ReactContextBaseJavaModule;
+import com.facebook.react.bridge.ReactMethod;
+
+import java.util.Map;
+import java.util.HashMap;
+
+public class ToastModule extends ReactContextBaseJavaModule {
+
+ private static final String DURATION_SHORT_KEY = "SHORT";
+ private static final String DURATION_LONG_KEY = "LONG";
+
+ public ToastModule(ReactApplicationContext reactContext) {
+ super(reactContext);
+ }
+}
+```
+
+`ReactContextBaseJavaModule` requires that a method called `getName` is implemented. The purpose of this method is to return the string name of the `NativeModule` which represents this class in JavaScript. So here we will call this `ToastExample` so that we can access it through `React.NativeModules.ToastExample` in JavaScript.
+
+```java
+ @Override
+ public String getName() {
+ return "ToastExample";
+ }
+```
+
+An optional method called `getConstants` returns the constant values exposed to JavaScript. Its implementation is not required but is very useful to key pre-defined values that need to be communicated from JavaScript to Java in sync.
+
+```java
+ @Override
+ public Map getConstants() {
+ final Map constants = new HashMap<>();
+ constants.put(DURATION_SHORT_KEY, Toast.LENGTH_SHORT);
+ constants.put(DURATION_LONG_KEY, Toast.LENGTH_LONG);
+ return constants;
+ }
+```
+
+To expose a method to JavaScript a Java method must be annotated using `@ReactMethod`. The return type of bridge methods is always `void`. React Native bridge is asynchronous, so the only way to pass a result to JavaScript is by using callbacks or emitting events (see below).
+
+```java
+ @ReactMethod
+ public void show(String message, int duration) {
+ Toast.makeText(getReactApplicationContext(), message, duration).show();
+ }
+```
+
+### Argument Types
+
+The following argument types are supported for methods annotated with `@ReactMethod` and they directly map to their JavaScript equivalents
+
+```
+Boolean -> Bool
+Integer -> Number
+Double -> Number
+Float -> Number
+String -> String
+Callback -> function
+ReadableMap -> Object
+ReadableArray -> Array
+```
+
+Read more about [ReadableMap](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableMap.java) and [ReadableArray](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableArray.java)
+
+### Register the Module
+
+The last step within Java is to register the Module; this happens in the `createNativeModules` of your apps package. If a module is not registered it will not be available from JavaScript.
+
+create a new Java Class named `CustomToastPackage.java` inside `android/app/src/main/java/com/your-app-name/` folder with the content below:
+
+```java
+// CustomToastPackage.java
+
+package com.your-app-name;
+
+import com.facebook.react.ReactPackage;
+import com.facebook.react.bridge.NativeModule;
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.react.uimanager.ViewManager;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class CustomToastPackage implements ReactPackage {
+
+ @Override
+ public List createViewManagers(ReactApplicationContext reactContext) {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public List createNativeModules(
+ ReactApplicationContext reactContext) {
+ List modules = new ArrayList<>();
+
+ modules.add(new ToastModule(reactContext));
+
+ return modules;
+ }
+
+}
+```
+
+The package needs to be provided in the `getPackages` method of the `MainApplication.java` file. This file exists under the android folder in your react-native application directory. The path to this file is: `android/app/src/main/java/com/your-app-name/MainApplication.java`.
+
+```java
+// MainApplication.java
+
+...
+import com.your-app-name.CustomToastPackage; // <-- Add this line with your package name.
+...
+
+protected List getPackages() {
+ return Arrays.asList(
+ new MainReactPackage(),
+ new CustomToastPackage()); // <-- Add this line with your package name.
+}
+```
+
+To make it simpler to access your new functionality from JavaScript, it is common to wrap the native module in a JavaScript module. This is not necessary but saves the consumers of your library the need to pull it off of `NativeModules` each time. This JavaScript file also becomes a good location for you to add any JavaScript side functionality.
+
+```javascript
+/**
+ * This exposes the native ToastExample module as a JS module. This has a
+ * function 'show' which takes the following parameters:
+ *
+ * 1. String message: A string with the text to toast
+ * 2. int duration: The duration of the toast. May be ToastExample.SHORT or
+ * ToastExample.LONG
+ */
+import {NativeModules} from 'react-native';
+module.exports = NativeModules.ToastExample;
+```
+
+Now, from your other JavaScript file you can call the method like this:
+
+```javascript
+import ToastExample from './ToastExample';
+
+ToastExample.show('Awesome', ToastExample.SHORT);
+```
+
+## Beyond Toasts
+
+### Callbacks
+
+Native modules also support a special kind of argument - a callback. In most cases it is used to provide the function call result to JavaScript.
+
+```java
+import com.facebook.react.bridge.Callback;
+
+public class UIManagerModule extends ReactContextBaseJavaModule {
+
+...
+
+ @ReactMethod
+ public void measureLayout(
+ int tag,
+ int ancestorTag,
+ Callback errorCallback,
+ Callback successCallback) {
+ try {
+ measureLayout(tag, ancestorTag, mMeasureBuffer);
+ float relativeX = PixelUtil.toDIPFromPixel(mMeasureBuffer[0]);
+ float relativeY = PixelUtil.toDIPFromPixel(mMeasureBuffer[1]);
+ float width = PixelUtil.toDIPFromPixel(mMeasureBuffer[2]);
+ float height = PixelUtil.toDIPFromPixel(mMeasureBuffer[3]);
+ successCallback.invoke(relativeX, relativeY, width, height);
+ } catch (IllegalViewOperationException e) {
+ errorCallback.invoke(e.getMessage());
+ }
+ }
+
+...
+```
+
+This method would be accessed in JavaScript using:
+
+```javascript
+UIManager.measureLayout(
+ 100,
+ 100,
+ (msg) => {
+ console.log(msg);
+ },
+ (x, y, width, height) => {
+ console.log(x + ':' + y + ':' + width + ':' + height);
+ },
+);
+```
+
+A native module is supposed to invoke its callback only once. It can, however, store the callback and invoke it later.
+
+It is very important to highlight that the callback is not invoked immediately after the native function completes - remember that bridge communication is asynchronous, and this too is tied to the run loop.
+
+### Promises
+
+Native modules can also fulfill a promise, which can simplify your code, especially when using ES2016's `async/await` syntax. When the last parameter of a bridged native method is a `Promise`, its corresponding JS method will return a JS Promise object.
+
+Refactoring the above code to use a promise instead of callbacks looks like this:
+
+```java
+import com.facebook.react.bridge.Promise;
+
+public class UIManagerModule extends ReactContextBaseJavaModule {
+
+...
+ private static final String E_LAYOUT_ERROR = "E_LAYOUT_ERROR";
+ @ReactMethod
+ public void measureLayout(
+ int tag,
+ int ancestorTag,
+ Promise promise) {
+ try {
+ measureLayout(tag, ancestorTag, mMeasureBuffer);
+
+ WritableMap map = Arguments.createMap();
+
+ map.putDouble("relativeX", PixelUtil.toDIPFromPixel(mMeasureBuffer[0]));
+ map.putDouble("relativeY", PixelUtil.toDIPFromPixel(mMeasureBuffer[1]));
+ map.putDouble("width", PixelUtil.toDIPFromPixel(mMeasureBuffer[2]));
+ map.putDouble("height", PixelUtil.toDIPFromPixel(mMeasureBuffer[3]));
+
+ promise.resolve(map);
+ } catch (IllegalViewOperationException e) {
+ promise.reject(E_LAYOUT_ERROR, e);
+ }
+ }
+
+...
+```
+
+The JavaScript counterpart of this method returns a Promise. This means you can use the `await` keyword within an async function to call it and wait for its result:
+
+```javascript
+async function measureLayout() {
+ try {
+ var {relativeX, relativeY, width, height} = await UIManager.measureLayout(
+ 100,
+ 100,
+ );
+
+ console.log(relativeX + ':' + relativeY + ':' + width + ':' + height);
+ } catch (e) {
+ console.error(e);
+ }
+}
+
+measureLayout();
+```
+
+### Threading
+
+Native modules should not have any assumptions about what thread they are being called on, as the current assignment is subject to change in the future. If a blocking call is required, the heavy work should be dispatched to an internally managed worker thread, and any callbacks distributed from there.
+
+### Sending Events to JavaScript
+
+Native modules can signal events to JavaScript without being invoked directly. The easiest way to do this is to use the `RCTDeviceEventEmitter` which can be obtained from the `ReactContext` as in the code snippet below.
+
+```java
+...
+private void sendEvent(ReactContext reactContext,
+ String eventName,
+ @Nullable WritableMap params) {
+ reactContext
+ .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
+ .emit(eventName, params);
+}
+...
+WritableMap params = Arguments.createMap();
+...
+sendEvent(reactContext, "keyboardWillShow", params);
+```
+
+JavaScript modules can then register to receive events by `addListenerOn` using the `Subscribable` mixin.
+
+```javascript
+import { DeviceEventEmitter } from 'react-native';
+...
+
+var ScrollResponderMixin = {
+ mixins: [Subscribable.Mixin],
+
+
+ componentWillMount: function() {
+ ...
+ this.addListenerOn(DeviceEventEmitter,
+ 'keyboardWillShow',
+ this.scrollResponderKeyboardWillShow);
+ ...
+ },
+ scrollResponderKeyboardWillShow:function(e: Event) {
+ this.keyboardWillOpenTo = e;
+ this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e);
+ },
+```
+
+You can also directly use the `DeviceEventEmitter` module to listen for events.
+
+```javascript
+...
+componentWillMount: function() {
+ DeviceEventEmitter.addListener('keyboardWillShow', function(e: Event) {
+ // handle event.
+ });
+}
+...
+```
+
+### Getting activity result from `startActivityForResult`
+
+You'll need to listen to `onActivityResult` if you want to get results from an activity you started with `startActivityForResult`. To do this, you must extend `BaseActivityEventListener` or implement `ActivityEventListener`. The former is preferred as it is more resilient to API changes. Then, you need to register the listener in the module's constructor,
+
+```java
+reactContext.addActivityEventListener(mActivityResultListener);
+```
+
+Now you can listen to `onActivityResult` by implementing the following method:
+
+```java
+@Override
+public void onActivityResult(
+ final Activity activity,
+ final int requestCode,
+ final int resultCode,
+ final Intent intent) {
+ // Your logic here
+}
+```
+
+We will implement a simple image picker to demonstrate this. The image picker will expose the method `pickImage` to JavaScript, which will return the path of the image when called.
+
+```java
+public class ImagePickerModule extends ReactContextBaseJavaModule {
+
+ private static final int IMAGE_PICKER_REQUEST = 467081;
+ private static final String E_ACTIVITY_DOES_NOT_EXIST = "E_ACTIVITY_DOES_NOT_EXIST";
+ private static final String E_PICKER_CANCELLED = "E_PICKER_CANCELLED";
+ private static final String E_FAILED_TO_SHOW_PICKER = "E_FAILED_TO_SHOW_PICKER";
+ private static final String E_NO_IMAGE_DATA_FOUND = "E_NO_IMAGE_DATA_FOUND";
+
+ private Promise mPickerPromise;
+
+ private final ActivityEventListener mActivityEventListener = new BaseActivityEventListener() {
+
+ @Override
+ public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent intent) {
+ if (requestCode == IMAGE_PICKER_REQUEST) {
+ if (mPickerPromise != null) {
+ if (resultCode == Activity.RESULT_CANCELED) {
+ mPickerPromise.reject(E_PICKER_CANCELLED, "Image picker was cancelled");
+ } else if (resultCode == Activity.RESULT_OK) {
+ Uri uri = intent.getData();
+
+ if (uri == null) {
+ mPickerPromise.reject(E_NO_IMAGE_DATA_FOUND, "No image data found");
+ } else {
+ mPickerPromise.resolve(uri.toString());
+ }
+ }
+
+ mPickerPromise = null;
+ }
+ }
+ }
+ };
+
+ public ImagePickerModule(ReactApplicationContext reactContext) {
+ super(reactContext);
+
+ // Add the listener for `onActivityResult`
+ reactContext.addActivityEventListener(mActivityEventListener);
+ }
+
+ @Override
+ public String getName() {
+ return "ImagePickerModule";
+ }
+
+ @ReactMethod
+ public void pickImage(final Promise promise) {
+ Activity currentActivity = getCurrentActivity();
+
+ if (currentActivity == null) {
+ promise.reject(E_ACTIVITY_DOES_NOT_EXIST, "Activity doesn't exist");
+ return;
+ }
+
+ // Store the promise to resolve/reject when picker returns data
+ mPickerPromise = promise;
+
+ try {
+ final Intent galleryIntent = new Intent(Intent.ACTION_PICK);
+
+ galleryIntent.setType("image/*");
+
+ final Intent chooserIntent = Intent.createChooser(galleryIntent, "Pick an image");
+
+ currentActivity.startActivityForResult(chooserIntent, IMAGE_PICKER_REQUEST);
+ } catch (Exception e) {
+ mPickerPromise.reject(E_FAILED_TO_SHOW_PICKER, e);
+ mPickerPromise = null;
+ }
+ }
+}
+```
+
+### Listening to LifeCycle events
+
+Listening to the activity's LifeCycle events such as `onResume`, `onPause` etc. is very similar to how we implemented `ActivityEventListener`. The module must implement `LifecycleEventListener`. Then, you need to register a listener in the module's constructor,
+
+```java
+reactContext.addLifecycleEventListener(this);
+```
+
+Now you can listen to the activity's LifeCycle events by implementing the following methods:
+
+```java
+@Override
+public void onHostResume() {
+ // Activity `onResume`
+}
+
+@Override
+public void onHostPause() {
+ // Activity `onPause`
+}
+
+@Override
+public void onHostDestroy() {
+ // Activity `onDestroy`
+}
+```
diff --git a/docs/native-modules-ios.md b/docs/native-modules-ios.md
new file mode 100644
index 0000000..c5839c9
--- /dev/null
+++ b/docs/native-modules-ios.md
@@ -0,0 +1,487 @@
+---
+id: native-modules-ios
+title: Native Modules
+---
+
+Sometimes an app needs to access a platform API and React Native doesn't have a corresponding module yet. Maybe you want to reuse some existing Objective-C, Swift or C++ code without having to reimplement it in JavaScript, or write some high performance, multi-threaded code such as for image processing, a database, or any number of advanced extensions.
+
+We designed React Native such that it is possible for you to write real native code and have access to the full power of the platform. This is a more advanced feature and we don't expect it to be part of the usual development process, however it is essential that it exists. If React Native doesn't support a native feature that you need, you should be able to build it yourself.
+
+This is a more advanced guide that shows how to build a native module. It assumes the reader knows Objective-C or Swift and core libraries (Foundation, UIKit).
+
+## Native Module Setup
+
+Native modules are usually distributed as npm packages, except that for them to be native modules they will contain an Xcode library project. To get the basic scaffolding make sure to read [Native Modules Setup](native-modules-setup) guide first.
+
+## iOS Calendar Module Example
+
+This guide will use the [iOS Calendar API](https://developer.apple.com/library/mac/documentation/DataManagement/Conceptual/EventKitProgGuide/Introduction/Introduction.html) example. Let's say we would like to be able to access the iOS calendar from JavaScript.
+
+A native module is just an Objective-C class that implements the `RCTBridgeModule` protocol. If you are wondering, RCT is an abbreviation of ReaCT.
+
+```objectivec
+// CalendarManager.h
+#import
+
+@interface CalendarManager : NSObject
+@end
+```
+
+In addition to implementing the `RCTBridgeModule` protocol, your class must also include the `RCT_EXPORT_MODULE()` macro. This takes an optional argument that specifies the name that the module will be accessible as in your JavaScript code (more on this later). If you do not specify a name, the JavaScript module name will match the Objective-C class name. If the Objective-C class name begins with RCT, the JavaScript module name will exclude the RCT prefix.
+
+```objectivec
+// CalendarManager.m
+#import "CalendarManager.h"
+
+@implementation CalendarManager
+
+// To export a module named CalendarManager
+RCT_EXPORT_MODULE();
+
+// This would name the module AwesomeCalendarManager instead
+// RCT_EXPORT_MODULE(AwesomeCalendarManager);
+
+@end
+```
+
+React Native will not expose any methods of `CalendarManager` to JavaScript unless explicitly told to. This is done using the `RCT_EXPORT_METHOD()` macro:
+
+```objectivec
+#import "CalendarManager.h"
+#import
+
+@implementation CalendarManager
+
+RCT_EXPORT_MODULE();
+
+RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location)
+{
+ RCTLogInfo(@"Pretending to create an event %@ at %@", name, location);
+}
+
+@end
+```
+
+Now, from your JavaScript file you can call the method like this:
+
+```javascript
+import {NativeModules} from 'react-native';
+var CalendarManager = NativeModules.CalendarManager;
+CalendarManager.addEvent('Birthday Party', '4 Privet Drive, Surrey');
+```
+
+> **NOTE**: JavaScript method names
+>
+> The name of the method exported to JavaScript is the native method's name up to the first colon. React Native also defines a macro called `RCT_REMAP_METHOD()` to specify the JavaScript method's name. This is useful when multiple native methods are the same up to the first colon and would have conflicting JavaScript names.
+
+The CalendarManager module is instantiated on the Objective-C side using a [CalendarManager new] call. The return type of bridge methods is always `void`. React Native bridge is asynchronous, so the only way to pass a result to JavaScript is by using callbacks or emitting events (see below).
+
+## Argument Types
+
+`RCT_EXPORT_METHOD` supports all standard JSON object types, such as:
+
+* string (`NSString`)
+* number (`NSInteger`, `float`, `double`, `CGFloat`, `NSNumber`)
+* boolean (`BOOL`, `NSNumber`)
+* array (`NSArray`) of any types from this list
+* object (`NSDictionary`) with string keys and values of any type from this list
+* function (`RCTResponseSenderBlock`)
+
+But it also works with any type that is supported by the `RCTConvert` class (see [`RCTConvert`](https://github.com/facebook/react-native/blob/master/React/Base/RCTConvert.h) for details). The `RCTConvert` helper functions all accept a JSON value as input and map it to a native Objective-C type or class.
+
+In our `CalendarManager` example, we need to pass the event date to the native method. We can't send JavaScript Date objects over the bridge, so we need to convert the date to a string or number. We could write our native function like this:
+
+```objectivec
+RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location date:(nonnull NSNumber *)secondsSinceUnixEpoch)
+{
+ NSDate *date = [RCTConvert NSDate:secondsSinceUnixEpoch];
+}
+```
+
+or like this:
+
+```objectivec
+RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location date:(NSString *)ISO8601DateString)
+{
+ NSDate *date = [RCTConvert NSDate:ISO8601DateString];
+}
+```
+
+But by using the automatic type conversion feature, we can skip the manual conversion step completely, and just write:
+
+```objectivec
+RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location date:(NSDate *)date)
+{
+ // Date is ready to use!
+}
+```
+
+You would then call this from JavaScript by using either:
+
+```javascript
+CalendarManager.addEvent(
+ 'Birthday Party',
+ '4 Privet Drive, Surrey',
+ date.getTime(),
+); // passing date as number of milliseconds since Unix epoch
+```
+
+or
+
+```javascript
+CalendarManager.addEvent(
+ 'Birthday Party',
+ '4 Privet Drive, Surrey',
+ date.toISOString(),
+); // passing date as ISO-8601 string
+```
+
+And both values would get converted correctly to the native `NSDate`. A bad value, like an `Array`, would generate a helpful "RedBox" error message.
+
+As `CalendarManager.addEvent` method gets more and more complex, the number of arguments will grow. Some of them might be optional. In this case it's worth considering changing the API a little bit to accept a dictionary of event attributes, like this:
+
+```objectivec
+#import
+
+RCT_EXPORT_METHOD(addEvent:(NSString *)name details:(NSDictionary *)details)
+{
+ NSString *location = [RCTConvert NSString:details[@"location"]];
+ NSDate *time = [RCTConvert NSDate:details[@"time"]];
+ ...
+}
+```
+
+and call it from JavaScript:
+
+```javascript
+CalendarManager.addEvent('Birthday Party', {
+ location: '4 Privet Drive, Surrey',
+ time: date.getTime(),
+ description: '...',
+});
+```
+
+> **NOTE**: About array and map
+>
+> Objective-C doesn't provide any guarantees about the types of values in these structures. Your native module might expect an array of strings, but if JavaScript calls your method with an array containing numbers and strings, you'll get an `NSArray` containing a mix of `NSNumber` and `NSString`. For arrays, `RCTConvert` provides some typed collections you can use in your method declaration, such as `NSStringArray`, or `UIColorArray`. For maps, it is the developer's responsibility to check the value types individually by manually calling `RCTConvert` helper methods.
+
+## Callbacks
+
+> **WARNING**
+>
+> This section is more experimental than others because we don't have a solid set of best practices around callbacks yet.
+
+Native modules also supports a special kind of argument- a callback. In most cases it is used to provide the function call result to JavaScript.
+
+```objectivec
+RCT_EXPORT_METHOD(findEvents:(RCTResponseSenderBlock)callback)
+{
+ NSArray *events = ...
+ callback(@[[NSNull null], events]);
+}
+```
+
+`RCTResponseSenderBlock` accepts only one argument - an array of parameters to pass to the JavaScript callback. In this case we use Node's convention to make the first parameter an error object (usually `null` when there is no error) and the rest are the results of the function.
+
+```javascript
+CalendarManager.findEvents((error, events) => {
+ if (error) {
+ console.error(error);
+ } else {
+ this.setState({events: events});
+ }
+});
+```
+
+A native module should invoke its callback exactly once. It's okay to store the callback and invoke it later. This pattern is often used to wrap iOS APIs that require delegates - see [`RCTAlertManager`](https://github.com/facebook/react-native/blob/master/React/Modules/RCTAlertManager.m) for an example. If the callback is never invoked, some memory is leaked. If both `onSuccess` and `onFail` callbacks are passed, you should only invoke one of them.
+
+If you want to pass error-like objects to JavaScript, use `RCTMakeError` from [`RCTUtils.h`](https://github.com/facebook/react-native/blob/master/React/Base/RCTUtils.h). Right now this just passes an Error-shaped dictionary to JavaScript, but we would like to automatically generate real JavaScript `Error` objects in the future.
+
+## Promises
+
+Native modules can also fulfill a promise, which can simplify your code, especially when using ES2016's `async/await` syntax. When the last parameters of a bridged native method are an `RCTPromiseResolveBlock` and `RCTPromiseRejectBlock`, its corresponding JS method will return a JS Promise object.
+
+Refactoring the above code to use a promise instead of callbacks looks like this:
+
+```objectivec
+RCT_REMAP_METHOD(findEvents,
+ findEventsWithResolver:(RCTPromiseResolveBlock)resolve
+ rejecter:(RCTPromiseRejectBlock)reject)
+{
+ NSArray *events = ...
+ if (events) {
+ resolve(events);
+ } else {
+ NSError *error = ...
+ reject(@"no_events", @"There were no events", error);
+ }
+}
+```
+
+The JavaScript counterpart of this method returns a Promise. This means you can use the `await` keyword within an async function to call it and wait for its result:
+
+```javascript
+async function updateEvents() {
+ try {
+ var events = await CalendarManager.findEvents();
+
+ this.setState({events});
+ } catch (e) {
+ console.error(e);
+ }
+}
+
+updateEvents();
+```
+
+## Threading
+
+The native module should not have any assumptions about what thread it is being called on. React Native invokes native modules methods on a separate serial GCD queue, but this is an implementation detail and might change. The `- (dispatch_queue_t)methodQueue` method allows the native module to specify which queue its methods should be run on. For example, if it needs to use a main-thread-only iOS API, it should specify this via:
+
+```objectivec
+- (dispatch_queue_t)methodQueue
+{
+ return dispatch_get_main_queue();
+}
+```
+
+Similarly, if an operation may take a long time to complete, the native module should not block and can specify it's own queue to run operations on. For example, the `RCTAsyncLocalStorage` module creates its own queue so the React queue isn't blocked waiting on potentially slow disk access:
+
+```objectivec
+- (dispatch_queue_t)methodQueue
+{
+ return dispatch_queue_create("com.facebook.React.AsyncLocalStorageQueue", DISPATCH_QUEUE_SERIAL);
+}
+```
+
+The specified `methodQueue` will be shared by all of the methods in your module. If _just one_ of your methods is long-running (or needs to be run on a different queue than the others for some reason), you can use `dispatch_async` inside the method to perform that particular method's code on another queue, without affecting the others:
+
+```objectivec
+RCT_EXPORT_METHOD(doSomethingExpensive:(NSString *)param callback:(RCTResponseSenderBlock)callback)
+{
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+ // Call long-running code on background thread
+ ...
+ // You can invoke callback from any thread/queue
+ callback(@[...]);
+ });
+}
+```
+
+> **NOTE**: Sharing dispatch queues between modules
+>
+> The `methodQueue` method will be called once when the module is initialized, and then retained by the bridge, so there is no need to retain the queue yourself, unless you wish to make use of it within your module. However, if you wish to share the same queue between multiple modules then you will need to ensure that you retain and return the same queue instance for each of them; merely returning a queue of the same name for each won't work.
+
+## Dependency Injection
+
+The bridge initializes any registered RCTBridgeModules automatically, however you may wish to instantiate your own module instances (so you may inject dependencies, for example).
+
+You can do this by creating a class that implements the RCTBridgeDelegate Protocol, initializing an RCTBridge with the delegate as an argument and initialising a RCTRootView with the initialized bridge.
+
+```objectivec
+id moduleInitialiser = [[classThatImplementsRCTBridgeDelegate alloc] init];
+
+RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:moduleInitialiser launchOptions:nil];
+
+RCTRootView *rootView = [[RCTRootView alloc]
+ initWithBridge:bridge
+ moduleName:kModuleName
+ initialProperties:nil];
+```
+
+## Exporting Constants
+
+A native module can export constants that are immediately available to JavaScript at runtime. This is useful for communicating static data that would otherwise require a round-trip through the bridge.
+
+```objectivec
+- (NSDictionary *)constantsToExport
+{
+ return @{ @"firstDayOfTheWeek": @"Monday" };
+}
+```
+
+JavaScript can use this value right away, synchronously:
+
+```javascript
+console.log(CalendarManager.firstDayOfTheWeek);
+```
+
+Note that the constants are exported only at initialization time, so if you change `constantsToExport` values at runtime it won't affect the JavaScript environment.
+
+### Enum Constants
+
+Enums that are defined via `NS_ENUM` cannot be used as method arguments without first extending RCTConvert.
+
+In order to export the following `NS_ENUM` definition:
+
+```objectivec
+typedef NS_ENUM(NSInteger, UIStatusBarAnimation) {
+ UIStatusBarAnimationNone,
+ UIStatusBarAnimationFade,
+ UIStatusBarAnimationSlide,
+};
+```
+
+You must create a class extension of RCTConvert like so:
+
+```objectivec
+@implementation RCTConvert (StatusBarAnimation)
+ RCT_ENUM_CONVERTER(UIStatusBarAnimation, (@{ @"statusBarAnimationNone" : @(UIStatusBarAnimationNone),
+ @"statusBarAnimationFade" : @(UIStatusBarAnimationFade),
+ @"statusBarAnimationSlide" : @(UIStatusBarAnimationSlide)}),
+ UIStatusBarAnimationNone, integerValue)
+@end
+```
+
+You can then define methods and export your enum constants like this:
+
+```objectivec
+- (NSDictionary *)constantsToExport
+{
+ return @{ @"statusBarAnimationNone" : @(UIStatusBarAnimationNone),
+ @"statusBarAnimationFade" : @(UIStatusBarAnimationFade),
+ @"statusBarAnimationSlide" : @(UIStatusBarAnimationSlide) };
+};
+
+RCT_EXPORT_METHOD(updateStatusBarAnimation:(UIStatusBarAnimation)animation
+ completion:(RCTResponseSenderBlock)callback)
+```
+
+Your enum will then be automatically unwrapped using the selector provided (`integerValue` in the above example) before being passed to your exported method.
+
+## Sending Events to JavaScript
+
+The native module can signal events to JavaScript without being invoked directly. The preferred way to do this is to subclass `RCTEventEmitter`, implement `supportedEvents` and call `self sendEventWithName`:
+
+```objectivec
+// CalendarManager.h
+#import
+#import
+
+@interface CalendarManager : RCTEventEmitter
+
+@end
+```
+
+```objectivec
+// CalendarManager.m
+#import "CalendarManager.h"
+
+@implementation CalendarManager
+
+RCT_EXPORT_MODULE();
+
+- (NSArray *)supportedEvents
+{
+ return @[@"EventReminder"];
+}
+
+- (void)calendarEventReminderReceived:(NSNotification *)notification
+{
+ NSString *eventName = notification.userInfo[@"name"];
+ [self sendEventWithName:@"EventReminder" body:@{@"name": eventName}];
+}
+
+@end
+```
+
+JavaScript code can subscribe to these events by creating a new `NativeEventEmitter` instance around your module.
+
+```javascript
+import { NativeEventEmitter, NativeModules } from 'react-native';
+const { CalendarManager } = NativeModules;
+
+const calendarManagerEmitter = new NativeEventEmitter(CalendarManager);
+
+const subscription = calendarManagerEmitter.addListener(
+ 'EventReminder',
+ (reminder) => console.log(reminder.name)
+);
+...
+// Don't forget to unsubscribe, typically in componentWillUnmount
+subscription.remove();
+```
+
+For more examples of sending events to JavaScript, see [`RCTLocationObserver`](https://github.com/facebook/react-native/blob/master/Libraries/Geolocation/RCTLocationObserver.m).
+
+### Optimizing for zero listeners
+
+You will receive a warning if you expend resources unnecessarily by emitting an event while there are no listeners. To avoid this, and to optimize your module's workload (e.g. by unsubscribing from upstream notifications or pausing background tasks), you can override `startObserving` and `stopObserving` in your `RCTEventEmitter` subclass.
+
+```objectivec
+@implementation CalendarManager
+{
+ bool hasListeners;
+}
+
+// Will be called when this module's first listener is added.
+-(void)startObserving {
+ hasListeners = YES;
+ // Set up any upstream listeners or background tasks as necessary
+}
+
+// Will be called when this module's last listener is removed, or on dealloc.
+-(void)stopObserving {
+ hasListeners = NO;
+ // Remove upstream listeners, stop unnecessary background tasks
+}
+
+- (void)calendarEventReminderReceived:(NSNotification *)notification
+{
+ NSString *eventName = notification.userInfo[@"name"];
+ if (hasListeners) { // Only send events if anyone is listening
+ [self sendEventWithName:@"EventReminder" body:@{@"name": eventName}];
+ }
+}
+```
+
+## Exporting Swift
+
+Swift doesn't have support for macros so exposing it to React Native requires a bit more setup but works relatively the same.
+
+Let's say we have the same `CalendarManager` but as a Swift class:
+
+```swift
+// CalendarManager.swift
+
+@objc(CalendarManager)
+class CalendarManager: NSObject {
+
+ @objc(addEvent:location:date:)
+ func addEvent(name: String, location: String, date: NSNumber) -> Void {
+ // Date is ready to use!
+ }
+
+ @objc
+ func constantsToExport() -> [String: Any]! {
+ return ["someKey": "someValue"]
+ }
+
+}
+```
+
+> **NOTE**: It is important to use the @objc modifiers to ensure the class and functions are exported properly to the Objective-C runtime.
+
+Then create a private implementation file that will register the required information with the React Native bridge:
+
+```objectivec
+// CalendarManagerBridge.m
+#import
+
+@interface RCT_EXTERN_MODULE(CalendarManager, NSObject)
+
+RCT_EXTERN_METHOD(addEvent:(NSString *)name location:(NSString *)location date:(nonnull NSNumber *)date)
+
+@end
+```
+
+For those of you new to Swift and Objective-C, whenever you [mix the two languages in an iOS project](https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html), you will also need an additional bridging file, known as a bridging header, to expose the Objective-C files to Swift. Xcode will offer to create this header file for you if you add your Swift file to your app through the Xcode `File>New File` menu option. You will need to import `RCTBridgeModule.h` in this header file.
+
+```objectivec
+// CalendarManager-Bridging-Header.h
+#import
+```
+
+You can also use `RCT_EXTERN_REMAP_MODULE` and `_RCT_EXTERN_REMAP_METHOD` to alter the JavaScript name of the module or methods you are exporting. For more information see [`RCTBridgeModule`](https://github.com/facebook/react-native/blob/master/React/Base/RCTBridgeModule.h).
+
+> **Important when making third party modules**: Static libraries with Swift are only supported in Xcode 9 and later. In order for the Xcode project to build when you use Swift in the iOS static library you include in the module, your main app project must contain Swift code and a bridging header itself. If your app project does not contain any Swift code, a workaround can be a single empty .swift file and an empty bridging header.
diff --git a/docs/native-modules-setup.md b/docs/native-modules-setup.md
new file mode 100644
index 0000000..565c9af
--- /dev/null
+++ b/docs/native-modules-setup.md
@@ -0,0 +1,26 @@
+---
+id: native-modules-setup
+title: Native Modules Setup
+---
+
+Native modules are usually distributed as npm packages, except that on top of the usual Javascript they will include some native code per platform. To understand more about npm packages you may find [this guide](https://docs.npmjs.com/getting-started/publishing-npm-packages) useful.
+
+To get set up with the basic project structure for a native module we will use a third party tool [react-native-create-library](https://github.com/frostney/react-native-create-library). You can go ahead further and dive deep into how that library works, for our needs we will just need:
+
+```
+$ npm install -g react-native-create-library
+$ react-native-create-library MyLibrary
+```
+
+Where MyLibrary is the name you would like for the new module. After doing this you will navigate into `MyLibrary` folder and install the npm package to be locally available for your computer by doing:
+
+```
+$ npm install
+```
+
+After this is done you can go to your main react app folder (which you created by doing `react-native init MyApp`)
+
+* add your newly created module as a dependency in your package.json
+* run `npm install` to bring it along from your local npm repository.
+
+After this, you will be able to continue to native-modules-ios or native-module-android to add in some code. Make sure to read the README.md within your `MyLibrary` Directory for platform-specific instructions on how to include the project.
diff --git a/docs/navigator.md b/docs/navigator.md
new file mode 100644
index 0000000..b4bdcb3
--- /dev/null
+++ b/docs/navigator.md
@@ -0,0 +1,8 @@
+---
+id: navigator
+title: Navigator (Legacy Custom Component)
+---
+
+`Navigator` has been removed from the core React Native package in version 0.44. The module has been moved to a [`react-native-custom-components`](https://github.com/facebookarchive/react-native-custom-components) package that can be imported by your application in order to maintain backwards compatibility.
+
+To see the original docs for `Navigator`, please switch to an [older version of the docs](https://facebook.github.io/react-native/docs/0.43/navigator.html).
diff --git a/docs/netinfo.md b/docs/netinfo.md
new file mode 100644
index 0000000..79d29c8
--- /dev/null
+++ b/docs/netinfo.md
@@ -0,0 +1,171 @@
+---
+id: netinfo
+title: NetInfo
+---
+
+NetInfo exposes info about online/offline status
+
+```javascript
+NetInfo.getConnectionInfo().then((connectionInfo) => {
+ console.log(
+ 'Initial, type: ' +
+ connectionInfo.type +
+ ', effectiveType: ' +
+ connectionInfo.effectiveType,
+ );
+});
+function handleFirstConnectivityChange(connectionInfo) {
+ console.log(
+ 'First change, type: ' +
+ connectionInfo.type +
+ ', effectiveType: ' +
+ connectionInfo.effectiveType,
+ );
+ NetInfo.removeEventListener(
+ 'connectionChange',
+ handleFirstConnectivityChange,
+ );
+}
+NetInfo.addEventListener('connectionChange', handleFirstConnectivityChange);
+```
+
+### ConnectionType enum
+
+`ConnectionType` describes the type of connection the device is using to communicate with the network.
+
+Cross platform values for `ConnectionType`:
+
+* `none` - device is offline
+* `wifi` - device is online and connected via wifi, or is the iOS simulator
+* `cellular` - device is connected via Edge, 3G, WiMax, or LTE
+* `unknown` - error case and the network status is unknown
+
+Android-only values for `ConnectionType`:
+
+* `bluetooth` - device is connected via Bluetooth
+* `ethernet` - device is connected via Ethernet
+* `wimax` - device is connected via WiMAX
+
+### EffectiveConnectionType enum
+
+Cross platform values for `EffectiveConnectionType`:
+
+* `2g`
+* `3g`
+* `4g`
+* `unknown`
+
+### Android
+
+To request network info, you need to add the following line to your app's `AndroidManifest.xml`:
+
+``
+
+### Methods
+
+* [`addEventListener`](netinfo.md#addeventlistener)
+* [`removeEventListener`](netinfo.md#removeeventlistener)
+* [`getConnectionInfo`](netinfo.md#getconnectioninfo)
+* [`isConnectionExpensive`](netinfo.md#isconnectionexpensive)
+
+### Properties
+
+* [`isConnected`](netinfo.md#isconnected)
+
+---
+
+# Reference
+
+## Methods
+
+### `addEventListener()`
+
+```javascript
+NetInfo.addEventListener(eventName, handler);
+```
+
+Adds an event handler.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| --------- | ------------------------------ | -------- | ---------------------- |
+| eventName | enum(connectionChange, change) | Yes | The change event name. |
+| handler | function | Yes | Listener function. |
+
+Supported events:
+
+* `connectionChange`: Fires when the network status changes. The argument to the event handler is an object with keys:
+ * `type`: A `ConnectionType` (listed above)
+ * `effectiveType`: An `EffectiveConnectionType` (listed above)
+* `change`: This event is deprecated. Listen to `connectionChange` instead. Fires when the network status changes. The argument to the event handler is one of the deprecated connectivity types listed above.
+
+---
+
+### `removeEventListener()`
+
+```javascript
+NetInfo.removeEventListener(eventName, handler);
+```
+
+Removes the listener for network status changes.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| --------- | ------------------------------ | -------- | ---------------------- |
+| eventName | enum(connectionChange, change) | Yes | The change event name. |
+| handler | function | Yes | Listener function. |
+
+---
+
+### `getConnectionInfo()`
+
+```javascript
+NetInfo.getConnectionInfo();
+```
+
+Returns a promise that resolves to an object with `type` and `effectiveType` keys whose values are a [`ConnectionType`](netinfo.md#connectiontype-enum) and an [`EffectiveConnectionType`](netinfo.md#effectiveconnectiontype-enum)), respectively.
+
+---
+
+### `isConnectionExpensive()`
+
+```javascript
+NetInfo.isConnectionExpensive();
+```
+
+Available on Android. Detect if the current active connection is metered or not. A network is classified as metered when the user is sensitive to heavy data usage on that connection due to monetary costs, data limitations or battery/performance issues.
+
+```
+NetInfo.isConnectionExpensive()
+.then(isConnectionExpensive => {
+ console.log('Connection is ' + (isConnectionExpensive ? 'Expensive' : 'Not Expensive'));
+})
+.catch(error => {
+ console.error(error);
+});
+```
+
+## Properties
+
+### `isConnected`
+
+Available on all platforms. Asynchronously fetch a boolean to determine internet connectivity.
+
+```
+NetInfo.isConnected.fetch().then(isConnected => {
+ console.log('First, is ' + (isConnected ? 'online' : 'offline'));
+});
+function handleFirstConnectivityChange(isConnected) {
+ console.log('Then, is ' + (isConnected ? 'online' : 'offline'));
+ NetInfo.isConnected.removeEventListener(
+ 'connectionChange',
+ handleFirstConnectivityChange
+ );
+}
+NetInfo.isConnected.addEventListener(
+ 'connectionChange',
+ handleFirstConnectivityChange
+);
+```
diff --git a/docs/network.md b/docs/network.md
new file mode 100644
index 0000000..0989ae9
--- /dev/null
+++ b/docs/network.md
@@ -0,0 +1,192 @@
+---
+id: network
+title: Networking
+---
+
+Many mobile apps need to load resources from a remote URL. You may want to make a POST request to a REST API, or you may simply need to fetch a chunk of static content from another server.
+
+## Using Fetch
+
+React Native provides the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) for your networking needs. Fetch will seem familiar if you have used `XMLHttpRequest` or other networking APIs before. You may refer to MDN's guide on [Using Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) for additional information.
+
+#### Making requests
+
+In order to fetch content from an arbitrary URL, just pass the URL to fetch:
+
+```javascript
+fetch('https://mywebsite.com/mydata.json');
+```
+
+Fetch also takes an optional second argument that allows you to customize the HTTP request. You may want to specify additional headers, or make a POST request:
+
+```javascript
+fetch('https://mywebsite.com/endpoint/', {
+ method: 'POST',
+ headers: {
+ Accept: 'application/json',
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ firstParam: 'yourValue',
+ secondParam: 'yourOtherValue',
+ }),
+});
+```
+
+Take a look at the [Fetch Request docs](https://developer.mozilla.org/en-US/docs/Web/API/Request) for a full list of properties.
+
+#### Handling the response
+
+The above examples show how you can make a request. In many cases, you will want to do something with the response.
+
+Networking is an inherently asynchronous operation. Fetch methods will return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that makes it straightforward to write code that works in an asynchronous manner:
+
+```javascript
+function getMoviesFromApiAsync() {
+ return fetch('https://facebook.github.io/react-native/movies.json')
+ .then((response) => response.json())
+ .then((responseJson) => {
+ return responseJson.movies;
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+}
+```
+
+You can also use the proposed ES2017 `async`/`await` syntax in a React Native app:
+
+```javascript
+async function getMoviesFromApi() {
+ try {
+ let response = await fetch(
+ 'https://facebook.github.io/react-native/movies.json',
+ );
+ let responseJson = await response.json();
+ return responseJson.movies;
+ } catch (error) {
+ console.error(error);
+ }
+}
+```
+
+Don't forget to catch any errors that may be thrown by `fetch`, otherwise they will be dropped silently.
+
+```SnackPlayer name=Fetch%20Example
+import React from 'react';
+import { FlatList, ActivityIndicator, Text, View } from 'react-native';
+
+export default class FetchExample extends React.Component {
+
+ constructor(props){
+ super(props);
+ this.state ={ isLoading: true}
+ }
+
+ componentDidMount(){
+ return fetch('https://facebook.github.io/react-native/movies.json')
+ .then((response) => response.json())
+ .then((responseJson) => {
+
+ this.setState({
+ isLoading: false,
+ dataSource: responseJson.movies,
+ }, function(){
+
+ });
+
+ })
+ .catch((error) =>{
+ console.error(error);
+ });
+ }
+
+
+
+ render(){
+
+ if(this.state.isLoading){
+ return(
+
+
+
+ )
+ }
+
+ return(
+
+ {item.title}, {item.releaseYear}}
+ keyExtractor={({id}, index) => id}
+ />
+
+ );
+ }
+}
+```
+
+> By default, iOS will block any request that's not encrypted using SSL. If you need to fetch from a cleartext URL (one that begins with `http`) you will first need to [add an App Transport Security exception](integration-with-existing-apps.md#test-your-integration). If you know ahead of time what domains you will need access to, it is more secure to add exceptions just for those domains; if the domains are not known until runtime you can [disable ATS completely](integration-with-existing-apps.md#app-transport-security). Note however that from January 2017, [Apple's App Store review will require reasonable justification for disabling ATS](https://forums.developer.apple.com/thread/48979). See [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33) for more information.
+
+### Using Other Networking Libraries
+
+The [XMLHttpRequest API](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) is built in to React Native. This means that you can use third party libraries such as [frisbee](https://github.com/niftylettuce/frisbee) or [axios](https://github.com/mzabriskie/axios) that depend on it, or you can use the XMLHttpRequest API directly if you prefer.
+
+```javascript
+var request = new XMLHttpRequest();
+request.onreadystatechange = (e) => {
+ if (request.readyState !== 4) {
+ return;
+ }
+
+ if (request.status === 200) {
+ console.log('success', request.responseText);
+ } else {
+ console.warn('error');
+ }
+};
+
+request.open('GET', 'https://mywebsite.com/endpoint/');
+request.send();
+```
+
+> The security model for XMLHttpRequest is different than on web as there is no concept of [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) in native apps.
+
+## WebSocket Support
+
+React Native also supports [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket), a protocol which provides full-duplex communication channels over a single TCP connection.
+
+```javascript
+var ws = new WebSocket('ws://host.com/path');
+
+ws.onopen = () => {
+ // connection opened
+ ws.send('something'); // send a message
+};
+
+ws.onmessage = (e) => {
+ // a message was received
+ console.log(e.data);
+};
+
+ws.onerror = (e) => {
+ // an error occurred
+ console.log(e.message);
+};
+
+ws.onclose = (e) => {
+ // connection closed
+ console.log(e.code, e.reason);
+};
+```
+
+## Known Issues with `fetch` and cookie based authentication
+
+The following options are currently not working with `fetch`
+
+* `redirect:manual`
+* `credentials:omit`
+
+- Having same name headers on Android will result in only the latest one being present. A temporary solution can be found here: https://github.com/facebook/react-native/issues/18837#issuecomment-398779994.
+- Cookie based authentication is currently unstable. You can view some of the issues raised here: https://github.com/facebook/react-native/issues/23185
+- As a minimum on iOS, when redirected through a `302`, if a `Set-Cookie` header is present, the cookie is not set properly. Since the redirect cannot be handled manually this might cause a scenario where infinite requests occur if the redirect is the result of an expired session.
diff --git a/docs/out-of-tree-platforms.md b/docs/out-of-tree-platforms.md
new file mode 100644
index 0000000..016b0bd
--- /dev/null
+++ b/docs/out-of-tree-platforms.md
@@ -0,0 +1,41 @@
+---
+id: out-of-tree-platforms
+title: Out-of-Tree Platforms
+---
+
+React Native is not just for Android and iOS - there are community-supported projects that bring it to other platforms, such as:
+
+* [React Native Windows](https://github.com/Microsoft/react-native-windows) - React Native support for Microsoft's Universal Windows Platform (UWP) and the Windows Presentation Foundation (WPF)
+* [React Native DOM](https://github.com/vincentriemer/react-native-dom) - An experimental, comprehensive port of React Native to the web. (Not to be confused with [React Native Web](https://github.com/necolas/react-native-web), which has different goals)
+* [React Native Turbolinks](https://github.com/lazaronixon/react-native-turbolinks) - React Native adapter for building hybrid apps with Turbolinks 5.
+* [React Native Desktop](https://github.com/status-im/react-native-desktop) - A project aiming to bring React Native to the Desktop with Qt's QML. A fork of [React Native Ubuntu](https://github.com/CanonicalLtd/react-native/), which is no longer maintained.
+* [React Native macOS](https://github.com/ptmt/react-native-macos) - An experimental React Native fork targeting macOS and Cocoa
+
+## Creating your own React Native platform
+
+Right now the process of creating a React Native platform from scratch is not very well documented - one of the goals of the upcoming re-architecture ([Fabric](https://facebook.github.io/react-native/blog/2018/06/14/state-of-react-native-2018)) is to make maintaining a platform easier.
+
+### Bundling
+
+As of React Native 0.57 you can now register your React Native platform with React Native's JavaScript bundler, [Metro](https://facebook.github.io/metro/). This means you can pass `--platform example` to `react-native bundle`, and it will look for JavaScript files with the `.example.js` suffix.
+
+To register your platform with RNPM, your module's name must match one of these patterns:
+
+* `react-native-example` - It will search all top-level modules that start with `react-native-`
+* `@org/react-native-example` - It will search for modules that start with `react-native-` under any scope
+* `@react-native-example/module` - It will search in all modules under scopes with names starting with `@react-native-`
+
+You must also have an entry in your `package.json` like this:
+
+```json
+{
+ "rnpm": {
+ "haste": {
+ "providesModuleNodeModules": ["react-native-example"],
+ "platforms": ["example"]
+ }
+ }
+}
+```
+
+`"providesModuleNodeModules"` is an array of modules that will get added to the Haste module search path, and `"platforms"` is an array of platform suffixes that will be added as valid platforms.
diff --git a/docs/panresponder.md b/docs/panresponder.md
new file mode 100644
index 0000000..c0359d2
--- /dev/null
+++ b/docs/panresponder.md
@@ -0,0 +1,126 @@
+---
+id: panresponder
+title: PanResponder
+---
+
+`PanResponder` reconciles several touches into a single gesture. It makes single-touch gestures resilient to extra touches, and can be used to recognize simple multi-touch gestures.
+
+By default, `PanResponder` holds an `InteractionManager` handle to block long-running JS events from interrupting active gestures.
+
+It provides a predictable wrapper of the responder handlers provided by the [gesture responder system](gesture-responder-system.md). For each handler, it provides a new `gestureState` object alongside the native event object:
+
+```
+onPanResponderMove: (event, gestureState) => {}
+```
+
+A native event is a synthetic touch event with the following form:
+
+* `nativeEvent`
+ * `changedTouches` - Array of all touch events that have changed since the last event
+ * `identifier` - The ID of the touch
+ * `locationX` - The X position of the touch, relative to the element
+ * `locationY` - The Y position of the touch, relative to the element
+ * `pageX` - The X position of the touch, relative to the root element
+ * `pageY` - The Y position of the touch, relative to the root element
+ * `target` - The node id of the element receiving the touch event
+ * `timestamp` - A time identifier for the touch, useful for velocity calculation
+ * `touches` - Array of all current touches on the screen
+
+A `gestureState` object has the following:
+
+* `stateID` - ID of the gestureState- persisted as long as there at least one touch on screen
+* `moveX` - the latest screen coordinates of the recently-moved touch
+* `moveY` - the latest screen coordinates of the recently-moved touch
+* `x0` - the screen coordinates of the responder grant
+* `y0` - the screen coordinates of the responder grant
+* `dx` - accumulated distance of the gesture since the touch started
+* `dy` - accumulated distance of the gesture since the touch started
+* `vx` - current velocity of the gesture
+* `vy` - current velocity of the gesture
+* `numberActiveTouches` - Number of touches currently on screen
+
+### Basic Usage
+
+```javascript
+class ExampleComponent extends Component {
+ constructor(props) {
+ super(props);
+ this._panResponder = PanResponder.create({
+ // Ask to be the responder:
+ onStartShouldSetPanResponder: (evt, gestureState) => true,
+ onStartShouldSetPanResponderCapture: (evt, gestureState) => true,
+ onMoveShouldSetPanResponder: (evt, gestureState) => true,
+ onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,
+
+ onPanResponderGrant: (evt, gestureState) => {
+ // The gesture has started. Show visual feedback so the user knows
+ // what is happening!
+ // gestureState.d{x,y} will be set to zero now
+ },
+ onPanResponderMove: (evt, gestureState) => {
+ // The most recent move distance is gestureState.move{X,Y}
+ // The accumulated gesture distance since becoming responder is
+ // gestureState.d{x,y}
+ },
+ onPanResponderTerminationRequest: (evt, gestureState) => true,
+ onPanResponderRelease: (evt, gestureState) => {
+ // The user has released all touches while this view is the
+ // responder. This typically means a gesture has succeeded
+ },
+ onPanResponderTerminate: (evt, gestureState) => {
+ // Another component has become the responder, so this gesture
+ // should be cancelled
+ },
+ onShouldBlockNativeResponder: (evt, gestureState) => {
+ // Returns whether this component should block native components from becoming the JS
+ // responder. Returns true by default. Is currently only supported on android.
+ return true;
+ },
+ });
+ }
+
+ render() {
+ return ;
+ }
+}
+```
+
+### Working Example
+
+To see it in action, try the [PanResponder example in RNTester](https://github.com/facebook/react-native/blob/master/RNTester/js/PanResponderExample.js)
+
+### Methods
+
+* [`create`](panresponder.md#create)
+
+---
+
+# Reference
+
+## Methods
+
+### `create()`
+
+```javascript
+static create(config)
+```
+
+@param {object} config Enhanced versions of all of the responder callbacks that provide not only the typical `ResponderSyntheticEvent`, but also the `PanResponder` gesture state. Simply replace the word `Responder` with `PanResponder` in each of the typical `onResponder*` callbacks. For example, the `config` object would look like:
+
+* `onMoveShouldSetPanResponder: (e, gestureState) => {...}`
+* `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}`
+* `onStartShouldSetPanResponder: (e, gestureState) => {...}`
+* `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}`
+* `onPanResponderReject: (e, gestureState) => {...}`
+* `onPanResponderGrant: (e, gestureState) => {...}`
+* `onPanResponderStart: (e, gestureState) => {...}`
+* `onPanResponderEnd: (e, gestureState) => {...}`
+* `onPanResponderRelease: (e, gestureState) => {...}`
+* `onPanResponderMove: (e, gestureState) => {...}`
+* `onPanResponderTerminate: (e, gestureState) => {...}`
+* `onPanResponderTerminationRequest: (e, gestureState) => {...}`
+* `onShouldBlockNativeResponder: (e, gestureState) => {...}`
+
+In general, for events that have capture equivalents, we update the gestureState once in the capture phase and can use it in the bubble phase as well.
+
+Be careful with `onStartShould*` callbacks. They only reflect updated `gestureState` for start/end events that bubble/capture to the Node. Once the node is the responder, you can rely on every start/end event being processed by the gesture and `gestureState` being updated accordingly. (numberActiveTouches) may not be totally accurate unless you are the responder.
diff --git a/docs/permissionsandroid.md b/docs/permissionsandroid.md
new file mode 100644
index 0000000..94053f2
--- /dev/null
+++ b/docs/permissionsandroid.md
@@ -0,0 +1,168 @@
+---
+id: permissionsandroid
+title: PermissionsAndroid
+---
+
+
+
Project with Native Code Required
+
+ This API only works in projects made with react-native init
+ or in those made with expo init or Create React Native App which have since ejected. For
+ more information about ejecting, please see
+ the guide on
+ the Create React Native App repository.
+
+
+
+`PermissionsAndroid` provides access to Android M's new permissions model. The so-called "normal" permissions are granted by default when the application is installed as long as they appear in `AndroidManifest.xml`. However, "dangerous" permissions require a dialog prompt. You should use this module for those permissions.
+
+On devices before SDK version 23, the permissions are automatically granted if they appear in the manifest, so `check` should always result to `true` and `request` should always resolve to `PermissionsAndroid.RESULTS.GRANTED`.
+
+If a user has previously turned off a permission that you prompt for, the OS will advise your app to show a rationale for needing the permission. The optional `rationale` argument will show a dialog prompt only if necessary - otherwise the normal permission prompt will appear.
+
+### Example
+
+```javascript
+import {PermissionsAndroid} from 'react-native';
+
+async function requestCameraPermission() {
+ try {
+ const granted = await PermissionsAndroid.request(
+ PermissionsAndroid.PERMISSIONS.CAMERA,
+ {
+ title: 'Cool Photo App Camera Permission',
+ message:
+ 'Cool Photo App needs access to your camera ' +
+ 'so you can take awesome pictures.',
+ buttonNeutral: 'Ask Me Later',
+ buttonNegative: 'Cancel',
+ buttonPositive: 'OK',
+ },
+ );
+ if (granted === PermissionsAndroid.RESULTS.GRANTED) {
+ console.log('You can use the camera');
+ } else {
+ console.log('Camera permission denied');
+ }
+ } catch (err) {
+ console.warn(err);
+ }
+}
+```
+
+### Permissions that require prompting the user
+
+Available as constants under `PermissionsAndroid.PERMISSIONS`:
+
+* `READ_CALENDAR`: 'android.permission.READ_CALENDAR'
+* `WRITE_CALENDAR`: 'android.permission.WRITE_CALENDAR'
+* `CAMERA`: 'android.permission.CAMERA'
+* `READ_CONTACTS`: 'android.permission.READ_CONTACTS'
+* `WRITE_CONTACTS`: 'android.permission.WRITE_CONTACTS'
+* `GET_ACCOUNTS`: 'android.permission.GET_ACCOUNTS'
+* `ACCESS_FINE_LOCATION`: 'android.permission.ACCESS_FINE_LOCATION'
+* `ACCESS_COARSE_LOCATION`: 'android.permission.ACCESS_COARSE_LOCATION'
+* `RECORD_AUDIO`: 'android.permission.RECORD_AUDIO'
+* `READ_PHONE_STATE`: 'android.permission.READ_PHONE_STATE'
+* `CALL_PHONE`: 'android.permission.CALL_PHONE'
+* `READ_CALL_LOG`: 'android.permission.READ_CALL_LOG'
+* `WRITE_CALL_LOG`: 'android.permission.WRITE_CALL_LOG'
+* `ADD_VOICEMAIL`: 'com.android.voicemail.permission.ADD_VOICEMAIL'
+* `USE_SIP`: 'android.permission.USE_SIP'
+* `PROCESS_OUTGOING_CALLS`: 'android.permission.PROCESS_OUTGOING_CALLS'
+* `BODY_SENSORS`: 'android.permission.BODY_SENSORS'
+* `SEND_SMS`: 'android.permission.SEND_SMS'
+* `RECEIVE_SMS`: 'android.permission.RECEIVE_SMS'
+* `READ_SMS`: 'android.permission.READ_SMS'
+* `RECEIVE_WAP_PUSH`: 'android.permission.RECEIVE_WAP_PUSH'
+* `RECEIVE_MMS`: 'android.permission.RECEIVE_MMS'
+* `READ_EXTERNAL_STORAGE`: 'android.permission.READ_EXTERNAL_STORAGE'
+* `WRITE_EXTERNAL_STORAGE`: 'android.permission.WRITE_EXTERNAL_STORAGE'
+
+### Result strings for requesting permissions
+
+Available as constants under `PermissionsAndroid.RESULTS`:
+
+* `GRANTED`: 'granted'
+* `DENIED`: 'denied'
+* `NEVER_ASK_AGAIN`: 'never_ask_again'
+
+### Methods
+
+* [`constructor`](permissionsandroid.md#constructor)
+* [`check`](permissionsandroid.md#check)
+* [`request`](permissionsandroid.md#request)
+* [`requestMultiple`](permissionsandroid.md#requestmultiple)
+
+---
+
+# Reference
+
+## Methods
+
+### `constructor()`
+
+```javascript
+constructor();
+```
+
+---
+
+### `check()`
+
+```javascript
+check(permission);
+```
+
+Returns a promise resolving to a boolean value as to whether the specified permissions has been granted.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---------- | ------ | -------- | ---------------------------- |
+| permission | string | Yes | The permission to check for. |
+
+---
+
+### `request()`
+
+```javascript
+request(permission, [rationale]);
+```
+
+Prompts the user to enable a permission and returns a promise resolving to a string value (see result strings above) indicating whether the user allowed or denied the request or does not want to be asked again.
+
+If `rationale` is provided, this function checks with the OS whether it is necessary to show a dialog explaining why the permission is needed (https://developer.android.com/training/permissions/requesting.html#explain) and then shows the system permission dialog.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---------- | ------ | -------- | -------------------------- |
+| permission | string | Yes | The permission to request. |
+| rationale | object | No | See `rationale` below. |
+
+**Rationale:**
+
+| Name | Type | Required | Description |
+| -------------- | ------ | -------- | -------------------------------- |
+| title | string | Yes | The title of the dialog. |
+| message | string | Yes | The message of the dialog. |
+| buttonPositive | string | Yes | The text of the positive button. |
+| buttonNegative | string | No | The text of the negative button. |
+| buttonNeutral | string | No | The text of the neutral button. |
+
+---
+
+### `requestMultiple()`
+
+```javascript
+requestMultiple(permissions);
+```
+
+Prompts the user to enable multiple permissions in the same dialog and returns an object with the permissions as keys and strings as values (see result strings above) indicating whether the user allowed or denied the request or does not want to be asked again.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------- | ----- | -------- | -------------------------------- |
+| permissions | array | Yes | Array of permissions to request. |
diff --git a/docs/picker-item.md b/docs/picker-item.md
new file mode 100644
index 0000000..b2567ac
--- /dev/null
+++ b/docs/picker-item.md
@@ -0,0 +1,51 @@
+---
+id: picker-item
+title: Picker.Item
+---
+
+Individual selectable item in a [Picker](picker.md).
+
+### Props
+
+* [`label`](picker-item.md#label)
+* [`color`](picker-item.md#color)
+* [`testID`](picker-item.md#testid)
+* [`value`](picker-item.md#value)
+
+---
+
+# Reference
+
+## Props
+
+### `label`
+
+Text to display for this item.
+
+| Type | Required |
+| ------ | -------- |
+| string | Yes |
+
+### `color`
+
+Color of this item's text.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+### `testID`
+
+Used to locate the item in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+### `value`
+
+The value to be passed to picker's `onValueChange` callback when this item is selected. Can be a string or an integer.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| any | No | Android |
diff --git a/docs/picker-style-props.md b/docs/picker-style-props.md
new file mode 100644
index 0000000..87874a4
--- /dev/null
+++ b/docs/picker-style-props.md
@@ -0,0 +1,23 @@
+---
+id: picker-style-props
+title: Picker Style Props
+---
+
+[Picker](picker.md) style props.
+
+### Props
+
+* [View Style Props...](view-style-props.md)
+* [`color`](picker-style-props.md#color)
+
+---
+
+# Reference
+
+## Props
+
+### `color`
+
+| Type | Required |
+| ----------------- | -------- |
+| [color](color.md) | No |
diff --git a/docs/picker.md b/docs/picker.md
new file mode 100644
index 0000000..eed37d0
--- /dev/null
+++ b/docs/picker.md
@@ -0,0 +1,119 @@
+---
+id: picker
+title: Picker
+---
+
+Renders the native picker component on iOS and Android. Example:
+
+```javascript
+
+ this.setState({language: itemValue})
+ }>
+
+
+
+```
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`onValueChange`](picker.md#onvaluechange)
+- [`selectedValue`](picker.md#selectedvalue)
+- [`style`](picker.md#style)
+- [`testID`](picker.md#testid)
+- [`enabled`](picker.md#enabled)
+- [`mode`](picker.md#mode)
+- [`prompt`](picker.md#prompt)
+- [`itemStyle`](picker.md#itemstyle)
+
+---
+
+# Reference
+
+## Props
+
+### `onValueChange`
+
+Callback for when an item is selected. This is called with the following parameters:
+
+* `itemValue`: the `value` prop of the item that was selected
+* `itemPosition`: the index of the selected item in this picker
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `selectedValue`
+
+Value matching value of one of the items. Can be a string or an integer.
+
+| Type | Required |
+| ---- | -------- |
+| any | No |
+
+---
+
+### `style`
+
+| Type | Required |
+| --------------- | -------- |
+| pickerStyleType | No |
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `enabled`
+
+If set to false, the picker will be disabled, i.e. the user will not be able to make a selection.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `mode`
+
+On Android, specifies how to display the selection items when the user taps on the picker:
+
+* 'dialog': Show a modal dialog. This is the default.
+* 'dropdown': Shows a dropdown anchored to the picker view
+
+| Type | Required | Platform |
+| -------------------------- | -------- | -------- |
+| enum('dialog', 'dropdown') | No | Android |
+
+---
+
+### `prompt`
+
+Prompt string for this picker, used on Android in dialog mode as the title of the dialog.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| string | No | Android |
+
+---
+
+### `itemStyle`
+
+Style to apply to each of the item labels.
+
+| Type | Required | Platform |
+| ---------------------------------- | -------- | -------- |
+| [text styles](text-style-props.md) | No | iOS |
diff --git a/docs/pickerios.md b/docs/pickerios.md
new file mode 100644
index 0000000..b526e10
--- /dev/null
+++ b/docs/pickerios.md
@@ -0,0 +1,40 @@
+---
+id: pickerios
+title: PickerIOS
+---
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`itemStyle`](pickerios.md#itemstyle)
+- [`onValueChange`](pickerios.md#onvaluechange)
+- [`selectedValue`](pickerios.md#selectedvalue)
+
+---
+
+# Reference
+
+## Props
+
+### `itemStyle`
+
+| Type | Required |
+| ---------------------------------- | -------- |
+| [text styles](text-style-props.md) | No |
+
+---
+
+### `onValueChange`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `selectedValue`
+
+| Type | Required |
+| ---- | -------- |
+| any | No |
diff --git a/docs/pixelratio.md b/docs/pixelratio.md
new file mode 100644
index 0000000..ede78ae
--- /dev/null
+++ b/docs/pixelratio.md
@@ -0,0 +1,105 @@
+---
+id: pixelratio
+title: PixelRatio
+---
+
+PixelRatio class gives access to the device pixel density.
+
+## Fetching a correctly sized image
+
+You should get a higher resolution image if you are on a high pixel density device. A good rule of thumb is to multiply the size of the image you display by the pixel ratio.
+
+```javascript
+var image = getImage({
+ width: PixelRatio.getPixelSizeForLayoutSize(200),
+ height: PixelRatio.getPixelSizeForLayoutSize(100),
+});
+;
+```
+
+## Pixel grid snapping
+
+In iOS, you can specify positions and dimensions for elements with arbitrary precision, for example 29.674825. But, ultimately the physical display only have a fixed number of pixels, for example 640×960 for iPhone 4 or 750×1334 for iPhone 6. iOS tries to be as faithful as possible to the user value by spreading one original pixel into multiple ones to trick the eye. The downside of this technique is that it makes the resulting element look blurry.
+
+In practice, we found out that developers do not want this feature and they have to work around it by doing manual rounding in order to avoid having blurry elements. In React Native, we are rounding all the pixels automatically.
+
+We have to be careful when to do this rounding. You never want to work with rounded and unrounded values at the same time as you're going to accumulate rounding errors. Having even one rounding error is deadly because a one pixel border may vanish or be twice as big.
+
+In React Native, everything in JavaScript and within the layout engine works with arbitrary precision numbers. It's only when we set the position and dimensions of the native element on the main thread that we round. Also, rounding is done relative to the root rather than the parent, again to avoid accumulating rounding errors.
+
+### Methods
+
+* [`get`](pixelratio.md#get)
+* [`getFontScale`](pixelratio.md#getfontscale)
+* [`getPixelSizeForLayoutSize`](pixelratio.md#getpixelsizeforlayoutsize)
+* [`roundToNearestPixel`](pixelratio.md#roundtonearestpixel)
+
+---
+
+# Reference
+
+## Methods
+
+### `get()`
+
+```javascript
+static get()
+```
+
+Returns the device pixel density. Some examples:
+
+* PixelRatio.get() === 1
+ * [mdpi Android devices](https://material.io/tools/devices/)
+* PixelRatio.get() === 1.5
+ * [hdpi Android devices](https://material.io/tools/devices/)
+* PixelRatio.get() === 2
+ * iPhone 4, 4S
+ * iPhone 5, 5C, 5S
+ * iPhone 6, 7, 8
+ * iPhone XR
+ * [xhdpi Android devices](https://material.io/tools/devices/)
+* PixelRatio.get() === 3
+ * iPhone 6 Plus, 7 Plus, 8 Plus
+ * iPhone X, XS, XS Max
+ * Pixel, Pixel 2
+ * [xxhdpi Android devices](https://material.io/tools/devices/)
+* PixelRatio.get() === 3.5
+ * Nexus 6
+ * Pixel XL, Pixel 2 XL
+ * [xxxhdpi Android devices](https://material.io/tools/devices/)
+
+---
+
+### `getFontScale()`
+
+```javascript
+static getFontScale()
+```
+
+Returns the scaling factor for font sizes. This is the ratio that is used to calculate the absolute font size, so any elements that heavily depend on that should use this to do calculations.
+
+If a font scale is not set, this returns the device pixel ratio.
+
+Currently this is only implemented on Android and reflects the user preference set in Settings > Display > Font size, on iOS it will always return the default pixel ratio. @platform android
+
+---
+
+### `getPixelSizeForLayoutSize()`
+
+```javascript
+static getPixelSizeForLayoutSize(layoutSize)
+```
+
+Converts a layout size (dp) to pixel size (px).
+
+Guaranteed to return an integer number.
+
+---
+
+### `roundToNearestPixel()`
+
+```javascript
+static roundToNearestPixel(layoutSize)
+```
+
+Rounds a layout size (dp) to the nearest layout size that corresponds to an integer number of pixels. For example, on a device with a PixelRatio of 3, `PixelRatio.roundToNearestPixel(8.4) = 8.33`, which corresponds to exactly (8.33 \* 3) = 25 pixels.
diff --git a/docs/platform-specific-code.md b/docs/platform-specific-code.md
new file mode 100644
index 0000000..4ad473c
--- /dev/null
+++ b/docs/platform-specific-code.md
@@ -0,0 +1,123 @@
+---
+id: platform-specific-code
+title: Platform Specific Code
+---
+
+When building a cross-platform app, you'll want to re-use as much code as possible. Scenarios may arise where it makes sense for the code to be different, for example you may want to implement separate visual components for iOS and Android.
+
+React Native provides two ways to easily organize your code and separate it by platform:
+
+* Using the [`Platform` module](platform-specific-code.md#platform-module).
+* Using [platform-specific file extensions](platform-specific-code.md#platform-specific-extensions).
+
+Certain components may have properties that work on one platform only. All of these props are annotated with `@platform` and have a small badge next to them on the website.
+
+## Platform module
+
+React Native provides a module that detects the platform in which the app is running. You can use the detection logic to implement platform-specific code. Use this option when only small parts of a component are platform-specific.
+
+```javascript
+import {Platform, StyleSheet} from 'react-native';
+
+const styles = StyleSheet.create({
+ height: Platform.OS === 'ios' ? 200 : 100,
+});
+```
+
+`Platform.OS` will be `ios` when running on iOS and `android` when running on Android.
+
+There is also a `Platform.select` method available, that given an object containing Platform.OS as keys, returns the value for the platform you are currently running on.
+
+```javascript
+import {Platform, StyleSheet} from 'react-native';
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ ...Platform.select({
+ ios: {
+ backgroundColor: 'red',
+ },
+ android: {
+ backgroundColor: 'blue',
+ },
+ }),
+ },
+});
+```
+
+This will result in a container having `flex: 1` on both platforms, a red background color on iOS, and a blue background color on Android.
+
+Since it accepts `any` value, you can also use it to return platform specific component, like below:
+
+```javascript
+const Component = Platform.select({
+ ios: () => require('ComponentIOS'),
+ android: () => require('ComponentAndroid'),
+})();
+
+;
+```
+
+### Detecting the Android version
+
+On Android, the `Platform` module can also be used to detect the version of the Android Platform in which the app is running:
+
+```javascript
+import {Platform} from 'react-native';
+
+if (Platform.Version === 25) {
+ console.log('Running on Nougat!');
+}
+```
+
+### Detecting the iOS version
+
+On iOS, the `Version` is a result of `-[UIDevice systemVersion]`, which is a string with the current version of the operating system. An example of the system version is "10.3". For example, to detect the major version number on iOS:
+
+```javascript
+import {Platform} from 'react-native';
+
+const majorVersionIOS = parseInt(Platform.Version, 10);
+if (majorVersionIOS <= 9) {
+ console.log('Work around a change in behavior');
+}
+```
+
+## Platform-specific extensions
+
+When your platform-specific code is more complex, you should consider splitting the code out into separate files. React Native will detect when a file has a `.ios.` or `.android.` extension and load the relevant platform file when required from other components.
+
+For example, say you have the following files in your project:
+
+```sh
+BigButton.ios.js
+BigButton.android.js
+```
+
+You can then require the component as follows:
+
+```javascript
+import BigButton from './BigButton';
+```
+
+React Native will automatically pick up the right file based on the running platform.
+
+## Native-specific extensions (i.e. sharing code with NodeJS and Web)
+
+You can also use the `.native.js` extension when a module needs to be shared between NodeJS/Web and React Native but it has no Android/iOS differences. This is specially useful for projects that has common code shared among React Native and ReactJS.
+
+For example, say you have the following files in your project:
+
+```sh
+Container.js # picked up by Webpack, Rollup or any other Web bundler
+Container.native.js # picked up by the React Native bundler for both Android and iOS (Metro)
+```
+
+You can still require it without the `.native` extension, as follows:
+
+```javascript
+import Container from './Container';
+```
+
+**Pro tip:** Configure your Web bundler to ignore `.native.js` extensions in order to avoid having unused code in your production bundle, thus reducing the final bundle size.
diff --git a/docs/progressbarandroid.md b/docs/progressbarandroid.md
new file mode 100644
index 0000000..a28d6a8
--- /dev/null
+++ b/docs/progressbarandroid.md
@@ -0,0 +1,123 @@
+---
+id: progressbarandroid
+title: ProgressBarAndroid
+---
+
+Android-only React component used to indicate that the app is loading or there is some activity in the app.
+
+Example:
+
+```javascript
+import React, {Component} from 'react';
+import {ProgressBarAndroid, AppRegistry, StyleSheet, View} from 'react-native';
+
+export default class App extends Component {
+ render() {
+ return (
+
+
+
+
+
+
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'space-evenly',
+ padding: 10,
+ },
+});
+
+AppRegistry.registerComponent('App', () => App);
+```
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`animating`](progressbarandroid.md#animating)
+- [`color`](progressbarandroid.md#color)
+- [`indeterminate`](progressbarandroid.md#indeterminate)
+- [`progress`](progressbarandroid.md#progress)
+- [`styleAttr`](progressbarandroid.md#styleattr)
+- [`testID`](progressbarandroid.md#testid)
+
+---
+
+# Reference
+
+## Props
+
+### `animating`
+
+Whether to show the ProgressBar (true, the default) or hide it (false).
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `color`
+
+Color of the progress bar.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `indeterminate`
+
+If the progress bar will show indeterminate progress. Note that this can only be false if styleAttr is Horizontal.
+
+| Type | Required |
+| ----------------- | -------- |
+| indeterminateType | No |
+
+---
+
+### `progress`
+
+The progress value (between 0 and 1).
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `styleAttr`
+
+Style of the ProgressBar. One of:
+
+* Horizontal
+* Normal (default)
+* Small
+* Large
+* Inverse
+* SmallInverse
+* LargeInverse
+
+| Type | Required |
+| ----------------------------------------------------------------------------------------- | -------- |
+| enum('Horizontal', 'Normal', 'Small', 'Large', 'Inverse', 'SmallInverse', 'LargeInverse') | No |
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
diff --git a/docs/progressviewios.md b/docs/progressviewios.md
new file mode 100644
index 0000000..a43dc4d
--- /dev/null
+++ b/docs/progressviewios.md
@@ -0,0 +1,81 @@
+---
+id: progressviewios
+title: ProgressViewIOS
+---
+
+Use `ProgressViewIOS` to render a UIProgressView on iOS.
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`progress`](progressviewios.md#progress)
+- [`progressImage`](progressviewios.md#progressimage)
+- [`progressTintColor`](progressviewios.md#progresstintcolor)
+- [`progressViewStyle`](progressviewios.md#progressviewstyle)
+- [`trackImage`](progressviewios.md#trackimage)
+- [`trackTintColor`](progressviewios.md#tracktintcolor)
+
+---
+
+# Reference
+
+## Props
+
+### `progress`
+
+The progress value (between 0 and 1).
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `progressImage`
+
+A stretchable image to display as the progress bar.
+
+| Type | Required |
+| ---------------------- | -------- |
+| Image.propTypes.source | No |
+
+---
+
+### `progressTintColor`
+
+The tint color of the progress bar itself.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `progressViewStyle`
+
+The progress bar style.
+
+| Type | Required |
+| ---------------------- | -------- |
+| enum('default', 'bar') | No |
+
+---
+
+### `trackImage`
+
+A stretchable image to display behind the progress bar.
+
+| Type | Required |
+| ---------------------- | -------- |
+| Image.propTypes.source | No |
+
+---
+
+### `trackTintColor`
+
+The tint color of the progress bar track.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
diff --git a/docs/props.md b/docs/props.md
new file mode 100644
index 0000000..32709fe
--- /dev/null
+++ b/docs/props.md
@@ -0,0 +1,67 @@
+---
+id: props
+title: Props
+---
+
+Most components can be customized when they are created, with different parameters. These creation parameters are called `props`.
+
+For example, one basic React Native component is the `Image`. When you create an image, you can use a prop named `source` to control what image it shows.
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, Image } from 'react-native';
+
+export default class Bananas extends Component {
+ render() {
+ let pic = {
+ uri: 'https://upload.wikimedia.org/wikipedia/commons/d/de/Bananavarieties.jpg'
+ };
+ return (
+
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => Bananas);
+```
+
+Notice the braces surrounding `{pic}` - these embed the variable `pic` into JSX. You can put any JavaScript expression inside braces in JSX.
+
+Your own components can also use `props`. This lets you make a single component that is used in many different places in your app, with slightly different properties in each place. Just refer to `this.props` in your `render` function. Here's an example:
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, Text, View } from 'react-native';
+
+class Greeting extends Component {
+ render() {
+ return (
+
+ Hello {this.props.name}!
+
+ );
+ }
+}
+
+export default class LotsOfGreetings extends Component {
+ render() {
+ return (
+
+
+
+
+
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => LotsOfGreetings);
+```
+
+Using `name` as a prop lets us customize the `Greeting` component, so we can reuse that component for each of our greetings. This example also uses the `Greeting` component in JSX, just like the built-in components. The power to do this is what makes React so cool - if you find yourself wishing that you had a different set of UI primitives to work with, you just invent new ones.
+
+The other new thing going on here is the [`View`](view.md) component. A [`View`](view.md) is useful as a container for other components, to help control style and layout.
+
+With `props` and the basic [`Text`](text.md), [`Image`](image.md), and [`View`](view.md) components, you can build a wide variety of static screens. To learn how to make your app change over time, you need to [learn about State](state.md).
diff --git a/docs/publishing.md b/docs/publishing.md
new file mode 100644
index 0000000..8c7cd8d
--- /dev/null
+++ b/docs/publishing.md
@@ -0,0 +1,82 @@
+---
+id: publishing-forks
+title: Publish your own version of react native
+---
+
+## TL;DR
+
+There is a docker image that helps you build the required Android sources without installing any additional tooling (other than [Docker](https://docs.docker.com/install/), which can be committed to a git branch as a fully functional React Native fork release.
+
+Run this from a fork of the React Native [repo](https://github.com/facebook/react-native).
+
+```
+git checkout -d release/my-react-native-release
+docker run --rm --name rn-build -v $PWD:/pwd -w /pwd reactnativecommunity/react-native-android /bin/sh -c "./gradlew installArchives"
+git add android --force
+git commit -a -m 'my react native forked release'
+git push
+```
+
+Install it in your app project package.json.
+
+```
+"dependencies": {
+ ...
+ "react-native": "myName/react-native#release/my-react-native-release"
+}
+```
+
+## Rationale
+
+The recommended approach to working with React Native is to always update to the latest version. No support is provided on older versions and if you run into issues the contributors will always ask you to upgrade to the latest version before even looking at your particular issue. Sometimes, though, you are temporarily stuck on an older React Native version, but you require some changes from newer versions urgently (bugfixes) without having to do a full upgrade right now. This situation should be short lived by definition and once you have the time, the real solution is to upgrade to the latest version.
+
+With this goal of a shortlived fork of React Native in mind, you can publish your own version of React Native. The facebook/react-native repository contains all the dependencies required to be used directly as a git dependency, except for the Android React Native library binary (.aar).
+
+## Building
+
+This binary needs to become available in your project's `node_modules/react-native/android` folder or directly in your gradle dependency of your Android app. You can achieve this in one of two ways: Git dependency branch, Android binary dependency through Maven.
+
+To build the .aar React Native library, you can follow the steps to [build from source](building-from-source.md) first to install all required tooling. Then to build the actual library, you can run the following in the root of your react-native checkout:
+
+```$bash
+./gradlew :ReactAndroid:installArchives --no-daemon
+```
+
+If you don't want to install the required toolchain for building from source, you can use a prebuilt docker image to create a react native binary;
+
+```
+docker run --rm --name rn-build -v $PWD:/pwd -w /pwd reactnativecommunity/react-native-android /bin/sh -c "./gradlew installArchives"
+```
+
+If you haven't used the Android NDK before or if you have a NDK version not exactly matching the required version for building React Native, this is the recommended approach.
+
+The resulting binary can be made available to app projects in one of the two ways described below.
+
+### Publishing to Maven/Nexus
+
+Upload the binaries from the `android` folder to maven and point your Android app project gradle dependency for React Native to your Maven/Nexus dependency.
+
+### Publishing to a git fork dependency
+
+Instead of uploading to Maven/Nexus, you can add the binaries built in the previous steps to git, by changing the .gitignore and committing the binaries to your forked branch. This allows you to make your fork into a functioning git dependency for React Native app projects.
+
+If you have changes that you want to actually merge to React Native, make them on another branch first and open a PR. To start making your dependency branch, make sure you are on a 'release/my-forked-release' branch, then merge any commits that you need from yourself or others into this branch. This release branch should never be merged into any other branch.
+
+```$bash
+# create .aar, then:
+git add android --force
+git commit -m 'my release commit'
+git push
+```
+
+Now you can use this branch as a git dependency in your app project, by pointing your package.json dependency to this branch:
+
+```
+"dependencies": {
+ ...
+ "react-native": "my-name/react-native#release/my-forked-release,
+ ...
+}
+```
+
+No other modifications to your dependencies should be necessary for your native changes to be included in your project.
diff --git a/docs/pushnotificationios.md b/docs/pushnotificationios.md
new file mode 100644
index 0000000..b48e568
--- /dev/null
+++ b/docs/pushnotificationios.md
@@ -0,0 +1,478 @@
+---
+id: pushnotificationios
+title: PushNotificationIOS
+---
+
+
+
Projects with Native Code Only
+
+ This section only applies to projects made with react-native init
+ or to those made with expo init or Create React Native App which have since ejected. For
+ more information about ejecting, please see
+ the guide on
+ the Create React Native App repository.
+
+
+
+Handle push notifications for your app, including permission handling and icon badge number.
+
+To get up and running, [configure your notifications with Apple](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html#//apple_ref/doc/uid/TP40012582-CH26-SW6) and your server-side system.
+
+[Manually link](linking-libraries-ios.md#manual-linking) the PushNotificationIOS library
+
+* Add the following to your Project: `node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj`
+* Add the following to `Link Binary With Libraries`: `libRCTPushNotification.a`
+
+Finally, to enable support for `notification` and `register` events you need to augment your AppDelegate.
+
+At the top of your `AppDelegate.m`:
+
+`#import `
+
+And then in your AppDelegate implementation add the following:
+
+```objectivec
+ // Required to register for notifications
+ - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
+ {
+ [RCTPushNotificationManager didRegisterUserNotificationSettings:notificationSettings];
+ }
+ // Required for the register event.
+ - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
+ {
+ [RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
+ }
+ // Required for the notification event. You must call the completion handler after handling the remote notification.
+ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
+ fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
+ {
+ [RCTPushNotificationManager didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
+ }
+ // Required for the registrationError event.
+ - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
+ {
+ [RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error];
+ }
+ // Required for the localNotification event.
+ - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
+ {
+ [RCTPushNotificationManager didReceiveLocalNotification:notification];
+ }
+```
+
+### Methods
+
+* [`presentLocalNotification`](pushnotificationios.md#presentlocalnotification)
+* [`scheduleLocalNotification`](pushnotificationios.md#schedulelocalnotification)
+* [`cancelAllLocalNotifications`](pushnotificationios.md#cancelalllocalnotifications)
+* [`removeAllDeliveredNotifications`](pushnotificationios.md#removealldeliverednotifications)
+* [`getDeliveredNotifications`](pushnotificationios.md#getdeliverednotifications)
+* [`removeDeliveredNotifications`](pushnotificationios.md#removedeliverednotifications)
+* [`setApplicationIconBadgeNumber`](pushnotificationios.md#setapplicationiconbadgenumber)
+* [`getApplicationIconBadgeNumber`](pushnotificationios.md#getapplicationiconbadgenumber)
+* [`cancelLocalNotifications`](pushnotificationios.md#cancellocalnotifications)
+* [`getScheduledLocalNotifications`](pushnotificationios.md#getscheduledlocalnotifications)
+* [`addEventListener`](pushnotificationios.md#addeventlistener)
+* [`removeEventListener`](pushnotificationios.md#removeeventlistener)
+* [`requestPermissions`](pushnotificationios.md#requestpermissions)
+* [`abandonPermissions`](pushnotificationios.md#abandonpermissions)
+* [`checkPermissions`](pushnotificationios.md#checkpermissions)
+* [`getInitialNotification`](pushnotificationios.md#getinitialnotification)
+* [`constructor`](pushnotificationios.md#constructor)
+* [`finish`](pushnotificationios.md#finish)
+* [`getMessage`](pushnotificationios.md#getmessage)
+* [`getSound`](pushnotificationios.md#getsound)
+* [`getCategory`](pushnotificationios.md#getcategory)
+* [`getAlert`](pushnotificationios.md#getalert)
+* [`getContentAvailable`](pushnotificationios.md#getcontentavailable)
+* [`getBadgeCount`](pushnotificationios.md#getbadgecount)
+* [`getData`](pushnotificationios.md#getdata)
+
+---
+
+# Reference
+
+## Methods
+
+### `presentLocalNotification()`
+
+```javascript
+PushNotificationIOS.presentLocalNotification(details);
+```
+
+Schedules the localNotification for immediate presentation.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | ------ | -------- | ----------- |
+| details | object | Yes | See below. |
+
+details is an object containing:
+
+* `alertBody` : The message displayed in the notification alert.
+* `alertAction` : The "action" displayed beneath an actionable notification. Defaults to "view";
+* `soundName` : The sound played when the notification is fired (optional).
+* `isSilent` : If true, the notification will appear without sound (optional).
+* `category` : The category of this notification, required for actionable notifications (optional).
+* `userInfo` : An optional object containing additional notification data.
+* `applicationIconBadgeNumber` (optional) : The number to display as the app's icon badge. The default value of this property is 0, which means that no badge is displayed.
+
+---
+
+### `scheduleLocalNotification()`
+
+```javascript
+PushNotificationIOS.scheduleLocalNotification(details);
+```
+
+Schedules the localNotification for future presentation.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | ------ | -------- | ----------- |
+| details | object | Yes | See below. |
+
+details is an object containing:
+
+* `fireDate` : The date and time when the system should deliver the notification.
+* `alertTitle` : The text displayed as the title of the notification alert.
+* `alertBody` : The message displayed in the notification alert.
+* `alertAction` : The "action" displayed beneath an actionable notification. Defaults to "view";
+* `soundName` : The sound played when the notification is fired (optional).
+* `isSilent` : If true, the notification will appear without sound (optional).
+* `category` : The category of this notification, required for actionable notifications (optional).
+* `userInfo` : An optional object containing additional notification data.
+* `applicationIconBadgeNumber` (optional) : The number to display as the app's icon badge. Setting the number to 0 removes the icon badge.
+* `repeatInterval` : The interval to repeat as a string. Possible values: `minute`, `hour`, `day`, `week`, `month`, `year`.
+
+---
+
+### `cancelAllLocalNotifications()`
+
+```javascript
+PushNotificationIOS.cancelAllLocalNotifications();
+```
+
+Cancels all scheduled localNotifications
+
+---
+
+### `removeAllDeliveredNotifications()`
+
+```javascript
+PushNotificationIOS.removeAllDeliveredNotifications();
+```
+
+Remove all delivered notifications from Notification Center
+
+---
+
+### `getDeliveredNotifications()`
+
+```javascript
+PushNotificationIOS.getDeliveredNotifications(callback);
+```
+
+Provides you with a list of the app’s notifications that are still displayed in Notification Center
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ----------------------------------------------------------- |
+| callback | function | Yes | Function which receive an array of delivered notifications. |
+
+A delivered notification is an object containing:
+
+* `identifier` : The identifier of this notification.
+* `title` : The title of this notification.
+* `body` : The body of this notification.
+* `category` : The category of this notification, if has one.
+* `userInfo` : An optional object containing additional notification data.
+* `thread-id` : The thread identifier of this notification, if has one.
+
+---
+
+### `removeDeliveredNotifications()`
+
+```javascript
+PushNotificationIOS.removeDeliveredNotifications(identifiers);
+```
+
+Removes the specified notifications from Notification Center
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------- | ----- | -------- | ---------------------------------- |
+| identifiers | array | Yes | Array of notification identifiers. |
+
+---
+
+### `setApplicationIconBadgeNumber()`
+
+```javascript
+PushNotificationIOS.setApplicationIconBadgeNumber(number);
+```
+
+Sets the badge number for the app icon on the home screen
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ------------------------------ |
+| number | number | Yes | Badge number for the app icon. |
+
+---
+
+### `getApplicationIconBadgeNumber()`
+
+```javascript
+PushNotificationIOS.getApplicationIconBadgeNumber(callback);
+```
+
+Gets the current badge number for the app icon on the home screen
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | -------------------------------------------------------- |
+| callback | function | Yes | A function that will be passed the current badge number. |
+
+---
+
+### `cancelLocalNotifications()`
+
+```javascript
+PushNotificationIOS.cancelLocalNotifications(userInfo);
+```
+
+Cancel local notifications.
+
+Optionally restricts the set of canceled notifications to those notifications whose `userInfo` fields match the corresponding fields in the `userInfo` argument.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ------ | -------- | ----------- |
+| userInfo | object | No | |
+
+---
+
+### `getScheduledLocalNotifications()`
+
+```javascript
+PushNotificationIOS.getScheduledLocalNotifications(callback);
+```
+
+Gets the local notifications that are currently scheduled.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ---------------------------------------------------------------------------------- |
+| callback | function | Yes | A function that will be passed an array of objects describing local notifications. |
+
+---
+
+### `addEventListener()`
+
+```javascript
+PushNotificationIOS.addEventListener(type, handler);
+```
+
+Attaches a listener to remote or local notification events while the app is running in the foreground or the background.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | -------- | -------- | ----------- |
+| type | string | Yes | Event type. |
+| handler | function | Yes | Listener. |
+
+Valid events are:
+
+* `notification` : Fired when a remote notification is received. The handler will be invoked with an instance of `PushNotificationIOS`.
+* `localNotification` : Fired when a local notification is received. The handler will be invoked with an instance of `PushNotificationIOS`.
+* `register`: Fired when the user registers for remote notifications. The handler will be invoked with a hex string representing the deviceToken.
+* `registrationError`: Fired when the user fails to register for remote notifications. Typically occurs when APNS is having issues, or the device is a simulator. The handler will be invoked with {message: string, code: number, details: any}.
+
+---
+
+### `removeEventListener()`
+
+```javascript
+PushNotificationIOS.removeEventListener(type, handler);
+```
+
+Removes the event listener. Do this in `componentWillUnmount` to prevent memory leaks
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | -------- | -------- | ----------- |
+| type | string | Yes | Event type. |
+| handler | function | Yes | Listener. |
+
+---
+
+### `requestPermissions()`
+
+```javascript
+PushNotificationIOS.requestPermissions([permissions]);
+```
+
+Requests notification permissions from iOS, prompting the user's dialog box. By default, it will request all notification permissions, but a subset of these can be requested by passing a map of requested permissions. The following permissions are supported:
+
+* `alert`
+* `badge`
+* `sound`
+
+If a map is provided to the method, only the permissions with truthy values will be requested.
+
+This method returns a promise that will resolve when the user accepts, rejects, or if the permissions were previously rejected. The promise resolves to the current state of the permission.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------- | ----- | -------- | ---------------------- |
+| permissions | array | No | alert, badge, or sound |
+
+---
+
+### `abandonPermissions()`
+
+```javascript
+PushNotificationIOS.abandonPermissions();
+```
+
+Unregister for all remote notifications received via Apple Push Notification service.
+
+You should call this method in rare circumstances only, such as when a new version of the app removes support for all types of remote notifications. Users can temporarily prevent apps from receiving remote notifications through the Notifications section of the Settings app. Apps unregistered through this method can always re-register.
+
+---
+
+### `checkPermissions()`
+
+```javascript
+PushNotificationIOS.checkPermissions(callback);
+```
+
+See what push permissions are currently enabled.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ----------- |
+| callback | function | Yes | See below. |
+
+`callback` will be invoked with a `permissions` object:
+
+* `alert` :boolean
+* `badge` :boolean
+* `sound` :boolean
+
+---
+
+### `getInitialNotification()`
+
+```javascript
+PushNotificationIOS.getInitialNotification();
+```
+
+This method returns a promise. If the app was launched by a push notification, this promise resolves to an object of type `PushNotificationIOS`. Otherwise, it resolves to `null`.
+
+---
+
+### `constructor()`
+
+```javascript
+constructor(nativeNotif);
+```
+
+You will never need to instantiate `PushNotificationIOS` yourself. Listening to the `notification` event and invoking `getInitialNotification` is sufficient.
+
+---
+
+### `finish()`
+
+```javascript
+finish(fetchResult);
+```
+
+This method is available for remote notifications that have been received via: `application:didReceiveRemoteNotification:fetchCompletionHandler:` https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/application:didReceiveRemoteNotification:fetchCompletionHandler:
+
+Call this to execute when the remote notification handling is complete. When calling this block, pass in the fetch result value that best describes the results of your operation. You _must_ call this handler and should do so as soon as possible. For a list of possible values, see `PushNotificationIOS.FetchResult`.
+
+If you do not call this method your background remote notifications could be throttled, to read more about it see the above documentation link.
+
+---
+
+### `getMessage()`
+
+```javascript
+getMessage();
+```
+
+An alias for `getAlert` to get the notification's main message string
+
+---
+
+### `getSound()`
+
+```javascript
+getSound();
+```
+
+Gets the sound string from the `aps` object
+
+---
+
+### `getCategory()`
+
+```javascript
+getCategory();
+```
+
+Gets the category string from the `aps` object
+
+---
+
+### `getAlert()`
+
+```javascript
+getAlert();
+```
+
+Gets the notification's main message from the `aps` object
+
+---
+
+### `getContentAvailable()`
+
+```javascript
+getContentAvailable();
+```
+
+Gets the content-available number from the `aps` object
+
+---
+
+### `getBadgeCount()`
+
+```javascript
+getBadgeCount();
+```
+
+Gets the badge count number from the `aps` object
+
+---
+
+### `getData()`
+
+```javascript
+getData();
+```
+
+Gets the data object on the notification
diff --git a/docs/refreshcontrol.md b/docs/refreshcontrol.md
new file mode 100644
index 0000000..83b6088
--- /dev/null
+++ b/docs/refreshcontrol.md
@@ -0,0 +1,164 @@
+---
+id: refreshcontrol
+title: RefreshControl
+---
+
+This component is used inside a ScrollView or ListView to add pull to refresh functionality. When the ScrollView is at `scrollY: 0`, swiping down triggers an `onRefresh` event.
+
+### Usage example
+
+```javascript
+import { ScrollView, RefreshControl } from 'react-native';
+
+class RefreshableList extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ refreshing: false,
+ };
+ }
+
+ _onRefresh = () => {
+ this.setState({refreshing: true});
+ fetchData().then(() => {
+ this.setState({refreshing: false});
+ });
+ }
+
+ render() {
+ return (
+
+ }
+ ...
+ />
+ );
+ }
+ ...
+}
+```
+
+**Note:** `refreshing` is a controlled prop, this is why it needs to be set to true in the `onRefresh` function otherwise the refresh indicator will stop immediately.
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`refreshing`](refreshcontrol.md#refreshing)
+- [`onRefresh`](refreshcontrol.md#onrefresh)
+- [`colors`](refreshcontrol.md#colors)
+- [`enabled`](refreshcontrol.md#enabled)
+- [`progressBackgroundColor`](refreshcontrol.md#progressbackgroundcolor)
+- [`progressViewOffset`](refreshcontrol.md#progressviewoffset)
+- [`size`](refreshcontrol.md#size)
+- [`tintColor`](refreshcontrol.md#tintcolor)
+- [`title`](refreshcontrol.md#title)
+- [`titleColor`](refreshcontrol.md#titlecolor)
+
+---
+
+# Reference
+
+## Props
+
+### `refreshing`
+
+Whether the view should be indicating an active refresh.
+
+| Type | Required |
+| ---- | -------- |
+| bool | Yes |
+
+---
+
+### `onRefresh`
+
+Called when the view starts refreshing.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `colors`
+
+The colors (at least one) that will be used to draw the refresh indicator.
+
+| Type | Required | Platform |
+| --------------------------- | -------- | -------- |
+| array of [color](colors.md) | No | Android |
+
+---
+
+### `enabled`
+
+Whether the pull to refresh functionality is enabled.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `progressBackgroundColor`
+
+The background color of the refresh indicator.
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | Android |
+
+---
+
+### `progressViewOffset`
+
+Progress view top offset
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | Android |
+
+---
+
+### `size`
+
+Size of the refresh indicator, see RefreshControl.SIZE.
+
+| Type | Required | Platform |
+| ---------------------------------------------------------------------- | -------- | -------- |
+| enum(RefreshLayoutConsts.SIZE.DEFAULT, RefreshLayoutConsts.SIZE.LARGE) | No | Android |
+
+---
+
+### `tintColor`
+
+The color of the refresh indicator.
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | iOS |
+
+---
+
+### `title`
+
+The title displayed under the refresh indicator.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| string | No | iOS |
+
+---
+
+### `titleColor`
+
+Title color.
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | iOS |
diff --git a/docs/removing-default-permissions.md b/docs/removing-default-permissions.md
new file mode 100644
index 0000000..321c013
--- /dev/null
+++ b/docs/removing-default-permissions.md
@@ -0,0 +1,69 @@
+---
+id: removing-default-permissions
+title: Removing Default Permissions
+---
+
+By default, some permissions are added to your Android APK.
+
+The default permissions that get added are:
+
+* android.permission.INTERNET - Required for debug mode.
+* android.permission.SYSTEM_ALERT_WINDOW - Required for debug mode.
+* android.permission.READ_PHONE_STATE - Not required for debug or production.
+* android.permission.WRITE_EXTERNAL_STORAGE - Not required for debug or production.
+* android.permission.READ_EXTERNAL_STORAGE - Not required for debug or production.
+
+1. Let's start by removing `READ_PHONE_STATE`, `WRITE_EXTERNAL_STORAGE`, and `READ_EXTERNAL_STORAGE` from both production and debug APKs, as it is not required in either. These storage permissions are still not needed if `AsyncStorage` module is in use, so it is safe to remove from both production and debug.
+2. Open your `android/app/src/main/AndroidManifest.xml` file.
+3. Even though these three permissions are not listed in the manifest they get added in. We add the three permissions with `tools:node="remove"` attribute, to make sure it gets removed during build. Note that the package identifier will be different, for below it is "com.myapp" because the project was created with `react-native init myapp`.
+
+ ```diff
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ ```
+
+4. Now let's remove `SYSTEM_ALERT_WINDOW` from the production APK only.
+5. Go to the `android/app/src/` directory. Create a new directory inside this directory, called `release`. (path: `android/app/src/release/`)
+6. Inside this `android/app/src/release/` directory create a `AndroidManifest.xml` file. (path: `android/app/src/release/AndroidManifest.xml`)
+7. Inside this file paste the following contents. Note, make sure to update your package identifier from "com.myapp" to what yours is.
+
+ ```diff
+
+
+
+
+
+ ```
+
+That's it. We did not remove the `INTERNET` permission as pretty much all apps use it. Now whenever you create a production APK all these 4 permissions will be removed. When you create a debug APK (`react-native run-android`) it will install the APK with only the three permissions removed, and `SYSTEM_ALERT_WINDOW` will remain.
diff --git a/docs/running-on-device.md b/docs/running-on-device.md
new file mode 100644
index 0000000..b650f2d
--- /dev/null
+++ b/docs/running-on-device.md
@@ -0,0 +1,501 @@
+---
+id: running-on-device
+title: Running On Device
+---
+
+
+
+It's always a good idea to test your app on an actual device before releasing it to your users. This document will guide you through the necessary steps to run your React Native app on a device and to get it ready for production.
+
+If you used Expo CLI or Create React Native App to set up your project, you can preview your app on a device by scanning the QR code with the Expo app. In order to build and run your app on a device, you will need to eject and install the native code dependencies from the [Getting Started guide](getting-started.md).
+
+
+
+
+
+ iOS
+
+
+ Android
+
+
+
+
+
+
+## Running your app on iOS devices
+
+
+
+## Running your app on Android devices
+
+
+
+
+
+
+
+A Mac is required in order to build your app for iOS devices. Alternatively, you can refer to the [Quick Start instructions](getting-started.md) to learn how to build your app using Expo CLI, which will allow you to run your app using the Expo client app.
+
+
+
+### 1. Plug in your device via USB
+
+Connect your iOS device to your Mac using a USB to Lightning cable. Navigate to the `ios` folder in your project, then open the `.xcodeproj` file, or if you are using CocoaPods open `.xcworkspace`, within it using Xcode.
+
+If this is your first time running an app on your iOS device, you may need to register your device for development. Open the **Product** menu from Xcode's menubar, then go to **Destination**. Look for and select your device from the list. Xcode will then register your device for development.
+
+### 2. Configure code signing
+
+Register for an [Apple developer account](https://developer.apple.com/) if you don't have one yet.
+
+Select your project in the Xcode Project Navigator, then select your main target (it should share the same name as your project). Look for the "General" tab. Go to "Signing" and make sure your Apple developer account or team is selected under the Team dropdown. Do the same for the tests target (it ends with Tests, and is below your main target).
+
+
+
+Repeat this step for the Tests target in your project.
+
+### 3. Build and Run your app
+
+If everything is set up correctly, your device will be listed as the build target in the Xcode toolbar, and it will also appear in the Devices pane (`⇧⌘2`). You can now press the **Build and run** button (`⌘R`) or select **Run** from the **Product** menu. Your app will launch on your device shortly.
+
+
+
+> If you run into any issues, please take a look at Apple's [Launching Your App on a Device](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html#//apple_ref/doc/uid/TP40012582-CH27-SW4) docs.
+
+
+
+### 1. Enable Debugging over USB
+
+Most Android devices can only install and run apps downloaded from Google Play, by default. You will need to enable USB Debugging on your device in order to install your app during development.
+
+To enable USB debugging on your device, you will first need to enable the "Developer options" menu by going to **Settings** → **About phone** and then tapping the `Build number` row at the bottom seven times. You can then go back to **Settings** → **Developer options** to enable "USB debugging".
+
+### 2. Plug in your device via USB
+
+Let's now set up an Android device to run our React Native projects. Go ahead and plug in your device via USB to your development machine.
+
+
+
+Next, check the manufacturer code by using `lsusb` (on mac, you must first [install lsusb](https://github.com/jlhonora/lsusb)). `lsusb` should output something like this:
+
+```bash
+$ lsusb
+Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
+Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+Bus 001 Device 003: ID 22b8:2e76 Motorola PCS
+Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
+Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
+Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+```
+
+These lines represent the USB devices currently connected to your machine.
+
+You want the line that represents your phone. If you're in doubt, try unplugging your phone and running the command again:
+
+```bash
+$ lsusb
+Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
+Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
+Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
+Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+```
+
+You'll see that after removing the phone, the line which has the phone model ("Motorola PCS" in this case) disappeared from the list. This is the line that we care about.
+
+`Bus 001 Device 003: ID 22b8:2e76 Motorola PCS`
+
+From the above line, you want to grab the first four digits from the device ID:
+
+`22b8:2e76`
+
+In this case, it's `22b8`. That's the identifier for Motorola.
+
+You'll need to input this into your udev rules in order to get up and running:
+
+```sh
+echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/51-android-usb.rules
+```
+
+Make sure that you replace `22b8` with the identifier you get in the above command.
+
+
+
+Now check that your device is properly connecting to ADB, the Android Debug Bridge, by running `adb devices`.
+
+```
+$ adb devices
+List of devices attached
+emulator-5554 offline # Google emulator
+14ed2fcc device # Physical device
+```
+
+Seeing `device` in the right column means the device is connected. You must have **only one device connected** at a time.
+
+### 3. Run your app
+
+Type the following in your command prompt to install and launch your app on the device:
+
+```
+$ react-native run-android
+```
+
+> If you get a "bridge configuration isn't available" error, see [Using adb reverse](running-on-device.md#method-1-using-adb-reverse-recommended).
+
+> Hint
+>
+> You can also use the `React Native CLI` to generate and run a `Release` build (e.g. `react-native run-android --variant=release`).
+
+
+
+
+
+## Connecting to the development server
+
+You can also iterate quickly on a device using the development server. You only have to be on the same Wi-Fi network as your computer. Shake your device to open the [Developer menu](debugging.md#accessing-the-in-app-developer-menu), then enable Live Reload. Your app will reload whenever your JavaScript code has changed.
+
+
+
+### Troubleshooting
+
+> If you have any issues, ensure that your Mac and device are on the same network and can reach each other. Many open wireless networks with captive portals are configured to prevent devices from reaching other devices on the network. You may use your device's Personal Hotspot feature in this case.
+
+When trying to connect to the development server you might get a [red screen with an error](debugging.md#in-app-errors-and-warnings) saying:
+
+> Connection to [http://localhost:8081/debugger-proxy?role=client]() timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in `RCTWebSocketExecutor.m`.
+
+To solve this issue check the following points.
+
+#### 1. Wi-Fi network.
+
+Make sure your laptop and your phone are on the **same** Wi-Fi network.
+
+#### 2. IP address
+
+Make sure that the build script detected the IP address of your machine correctly (e.g. 10.0.1.123).
+
+
+
+Open the **Report navigator** tab, select the last **Build** and search for `xip.io`. The IP address which gets embedded in the app should match your machines IP address plus the domain `.xip.io` (e.g. 10.0.1.123.xip.io)
+
+#### 3. Network/router configuration
+
+React Native uses the wildcard DNS service **xip.io** to address your device, as Apple ATS prohibits URLs with IP addresses instead of domain names, and developers' networks are often not set up to resolve local hostnames. Some routers have security features to prevent DNS Servers from resolving to anything in the local IP range.
+
+Now check if you are able to resolve the xip.io address, by running `nslookup`.
+
+```bash
+$ nslookup 10.0.1.123.xip.io
+```
+
+If it doesn't resolve your local IP address either the **xip.io** service is down or more likely your router prevents it.
+
+To still use xip.io behind your router:
+
+* configure your phone to use Google DNS (8.8.8.8)
+* disable the appropriate security feature in your router
+
+
+
+## Connecting to the development server
+
+You can also iterate quickly on a device by connecting to the development server running on your development machine. There are several ways of accomplishing this, depending on whether you have access to a USB cable or a Wi-Fi network.
+
+### Method 1: Using adb reverse (recommended)
+
+
+
+You can use this method if your device is running Android 5.0 (Lollipop) or newer, it has USB debugging enabled, and it is connected via USB to your development machine.
+
+
+
+Run the following in a command prompt:
+
+```
+$ adb -s reverse tcp:8081 tcp:8081
+```
+
+To find the device name, run the following adb command:
+
+```
+$ adb devices
+```
+
+You can now enable Live reloading from the [Developer menu](debugging.md#accessing-the-in-app-developer-menu). Your app will reload whenever your JavaScript code has changed.
+
+### Method 2: Connect via Wi-Fi
+
+You can also connect to the development server over Wi-Fi. You'll first need to install the app on your device using a USB cable, but once that has been done you can debug wirelessly by following these instructions. You'll need your development machine's current IP address before proceeding.
+
+
+
+You can find the IP address in **System Preferences** → **Network**.
+
+
+
+Open the command prompt and type `ipconfig` to find your machine's IP address ([more info](http://windows.microsoft.com/en-us/windows/using-command-line-tools-networking-information)).
+
+
+
+Open a terminal and type `/sbin/ifconfig` to find your machine's IP address.
+
+
+
+1. Make sure your laptop and your phone are on the **same** Wi-Fi network.
+2. Open your React Native app on your device.
+3. You'll see a [red screen with an error](debugging.md#in-app-errors-and-warnings). This is OK. The following steps will fix that.
+4. Open the in-app [Developer menu](debugging.md#accessing-the-in-app-developer-menu).
+5. Go to **Dev Settings** → **Debug server host & port for device**.
+6. Type in your machine's IP address and the port of the local dev server (e.g. 10.0.1.1:8081).
+7. Go back to the **Developer menu** and select **Reload JS**.
+
+You can now enable Live reloading from the [Developer menu](debugging.md#accessing-the-in-app-developer-menu). Your app will reload whenever your JavaScript code has changed.
+
+
+
+## Building your app for production
+
+You have built a great app using React Native, and you are now itching to release it in the App Store. The process is the same as any other native iOS app, with some additional considerations to take into account.
+
+### 1. Enable App Transport Security
+
+App Transport Security is a security feature introduced in iOS 9 that rejects all HTTP requests that are not sent over HTTPS. This can result in HTTP traffic being blocked, including the developer React Native server. ATS is disabled for `localhost` by default in React Native projects in order to make development easier.
+
+You should re-enable ATS prior to building your app for production by removing the `localhost` entry from the `NSExceptionDomains` dictionary in your `Info.plist` file in the `ios/` folder. You can also re-enable ATS from within Xcode by opening your target properties under the Info pane and editing the App Transport Security Settings entry.
+
+> If your application needs to access HTTP resources on production, see [this post](http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/) to learn how to configure ATS on your project.
+
+### 2. Configure release scheme
+
+Building an app for distribution in the App Store requires using the `Release` scheme in Xcode. Apps built for `Release` will automatically disable the in-app Developer menu, which will prevent your users from inadvertently accessing the menu in production. It will also bundle the JavaScript locally, so you can put the app on a device and test whilst not connected to the computer.
+
+To configure your app to be built using the `Release` scheme, go to **Product** → **Scheme** → **Edit Scheme**. Select the **Run** tab in the sidebar, then set the Build Configuration dropdown to `Release`.
+
+
+
+#### Pro Tips
+
+As your App Bundle grows in size, you may start to see a white screen flash between your splash screen and the display of your root application view. If this is the case, you can add the following code to `AppDelegate.m` in order to keep your splash screen displayed during the transition.
+
+```objc
+ // Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
+ UIView* launchScreenView = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] objectAtIndex:0];
+ launchScreenView.frame = self.window.bounds;
+ rootView.loadingView = launchScreenView;
+```
+
+The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase `Bundle React Native code and images`:
+
+```shell
+ if [ "${CONFIGURATION}" == "Debug" ]; then
+ export SKIP_BUNDLING=true
+ fi
+```
+
+### 3. Build app for release
+
+You can now build your app for release by tapping `⌘B` or selecting **Product** → **Build** from the menu bar. Once built for release, you'll be able to distribute the app to beta testers and submit the app to the App Store.
+
+> You can also use the `React Native CLI` to perform this operation using the option `--configuration` with the value `Release` (e.g. `react-native run-ios --configuration Release`).
+
+
+
+## Building your app for production
+
+You have built a great app using React Native, and you are now itching to release it in the Play Store. The process is the same as any other native Android app, with some additional considerations to take into account. Follow the guide for [generating a signed APK](signed-apk-android.md) to learn more.
+
+
diff --git a/docs/running-on-simulator-ios.md b/docs/running-on-simulator-ios.md
new file mode 100644
index 0000000..0164090
--- /dev/null
+++ b/docs/running-on-simulator-ios.md
@@ -0,0 +1,14 @@
+---
+id: running-on-simulator-ios
+title: Running On Simulator
+---
+
+## Starting the simulator
+
+Once you have your React Native project initialized, you can run `react-native run-ios` inside the newly created project directory. If everything is set up correctly, you should see your new app running in the iOS Simulator shortly.
+
+## Specifying a device
+
+You can specify the device the simulator should run with the `--simulator` flag, followed by the device name as a string. The default is `"iPhone X"`. If you wish to run your app on an iPhone 4s, just run `react-native run-ios --simulator="iPhone 4s"`.
+
+The device names correspond to the list of devices available in Xcode. You can check your available devices by running `xcrun simctl list devices` from the console.
diff --git a/docs/safeareaview.md b/docs/safeareaview.md
new file mode 100644
index 0000000..0f58c85
--- /dev/null
+++ b/docs/safeareaview.md
@@ -0,0 +1,24 @@
+---
+id: safeareaview
+title: SafeAreaView
+---
+
+The purpose of `SafeAreaView` is to render content within the safe area boundaries of a device. It is currently only applicable to iOS devices with iOS version 11 or later.
+
+`SafeAreaView` renders nested content and automatically applies paddings to reflect the portion of the view that is not covered by navigation bars, tab bars, toolbars, and other ancestor views. Moreover, and most importantly, Safe Area's paddings reflect the physical limitation of the screen, such as rounded corners or camera notches (i.e. the sensor housing area on iPhone X).
+
+### Usage Example
+
+Simply wrap your top level view with a `SafeAreaView` with a `flex: 1` style applied to it. You may also want to use a background color that matches your application's design.
+
+```javascript
+
+
+ Hello World!
+
+
+```
+
+### Props
+
+* [View props...](view.md#props)
diff --git a/docs/scrollview.md b/docs/scrollview.md
new file mode 100644
index 0000000..c4c0acf
--- /dev/null
+++ b/docs/scrollview.md
@@ -0,0 +1,676 @@
+---
+id: scrollview
+title: ScrollView
+---
+
+Component that wraps platform ScrollView while providing integration with touch locking "responder" system.
+
+Keep in mind that ScrollViews must have a bounded height in order to work, since they contain unbounded-height children into a bounded container (via a scroll interaction). In order to bound the height of a ScrollView, either set the height of the view directly (discouraged) or make sure all parent views have bounded height. Forgetting to transfer `{flex: 1}` down the view stack can lead to errors here, which the element inspector makes easy to debug.
+
+Doesn't yet support other contained responders from blocking this scroll view from becoming the responder.
+
+`` vs [``](flatlist.md) - which one to use?
+
+`ScrollView` simply renders all its react child components at once. That makes it very easy to understand and use.
+
+On the other hand, this has a performance downside. Imagine you have a very long list of items you want to display, maybe several screens worth of content. Creating JS components and native views for everything all at once, much of which may not even be shown, will contribute to slow rendering and increased memory usage.
+
+This is where `FlatList` comes into play. `FlatList` renders items lazily, just when they are about to appear, and removes items that scroll way off screen to save memory and processing time.
+
+`FlatList` is also handy if you want to render separators between your items, multiple columns, infinite scroll loading, or any number of other features it supports out of the box.
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`alwaysBounceVertical`](scrollview.md#alwaysbouncevertical)
+- [`contentContainerStyle`](scrollview.md#contentcontainerstyle)
+- [`keyboardDismissMode`](scrollview.md#keyboarddismissmode)
+- [`keyboardShouldPersistTaps`](scrollview.md#keyboardshouldpersisttaps)
+- [`onContentSizeChange`](scrollview.md#oncontentsizechange)
+- [`onMomentumScrollBegin`](scrollview.md#onmomentumscrollbegin)
+- [`onMomentumScrollEnd`](scrollview.md#onmomentumscrollend)
+- [`onScroll`](scrollview.md#onscroll)
+- [`onScrollBeginDrag`](scrollview.md#onscrollbegindrag)
+- [`onScrollEndDrag`](scrollview.md#onscrollenddrag)
+- [`pagingEnabled`](scrollview.md#pagingenabled)
+- [`refreshControl`](scrollview.md#refreshcontrol)
+- [`removeClippedSubviews`](scrollview.md#removeclippedsubviews)
+- [`scrollEnabled`](scrollview.md#scrollenabled)
+- [`showsHorizontalScrollIndicator`](scrollview.md#showshorizontalscrollindicator)
+- [`showsVerticalScrollIndicator`](scrollview.md#showsverticalscrollindicator)
+- [`stickyHeaderIndices`](scrollview.md#stickyheaderindices)
+- [`endFillColor`](scrollview.md#endfillcolor)
+- [`overScrollMode`](scrollview.md#overscrollmode)
+- [`scrollPerfTag`](scrollview.md#scrollperftag)
+- [`DEPRECATED_sendUpdatedChildFrames`](scrollview.md#deprecated-sendupdatedchildframes)
+- [`alwaysBounceHorizontal`](scrollview.md#alwaysbouncehorizontal)
+- [`horizontal`](scrollview.md#horizontal)
+- [`automaticallyAdjustContentInsets`](scrollview.md#automaticallyadjustcontentinsets)
+- [`bounces`](scrollview.md#bounces)
+- [`bouncesZoom`](scrollview.md#bounceszoom)
+- [`canCancelContentTouches`](scrollview.md#cancancelcontenttouches)
+- [`centerContent`](scrollview.md#centercontent)
+- [`contentInset`](scrollview.md#contentinset)
+- [`contentInsetAdjustmentBehavior`](scrollview.md#contentinsetadjustmentbehavior)
+- [`contentOffset`](scrollview.md#contentoffset)
+- [`decelerationRate`](scrollview.md#decelerationrate)
+- [`directionalLockEnabled`](scrollview.md#directionallockenabled)
+- [`indicatorStyle`](scrollview.md#indicatorstyle)
+- [`maximumZoomScale`](scrollview.md#maximumzoomscale)
+- [`minimumZoomScale`](scrollview.md#minimumzoomscale)
+- [`pinchGestureEnabled`](scrollview.md#pinchgestureenabled)
+- [`scrollEventThrottle`](scrollview.md#scrolleventthrottle)
+- [`scrollIndicatorInsets`](scrollview.md#scrollindicatorinsets)
+- [`scrollsToTop`](scrollview.md#scrollstotop)
+- [`snapToAlignment`](scrollview.md#snaptoalignment)
+- [`snapToInterval`](scrollview.md#snaptointerval)
+- [`snapToOffsets`](scrollview.md#snaptooffsets)
+- [`snapToStart`](scrollview.md#snaptostart)
+- [`snapToEnd`](scrollview.md#snaptoend)
+- [`zoomScale`](scrollview.md#zoomscale)
+- [`nestedScrollEnabled`](scrollview.md#nestedscrollenabled)
+
+### Methods
+
+* [`scrollTo`](scrollview.md#scrollto)
+* [`scrollToEnd`](scrollview.md#scrolltoend)
+* [`scrollWithoutAnimationTo`](scrollview.md#scrollwithoutanimationto)
+* [`flashScrollIndicators`](scrollview.md#flashscrollindicators)
+
+---
+
+# Reference
+
+## Props
+
+### `alwaysBounceVertical`
+
+When true, the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself. The default value is false when `horizontal={true}` and true otherwise.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `contentContainerStyle`
+
+These styles will be applied to the scroll view content container which wraps all of the child views. Example:
+
+```
+return (
+
+
+);
+...
+const styles = StyleSheet.create({
+ contentContainer: {
+ paddingVertical: 20
+ }
+});
+```
+
+| Type | Required |
+| ------------------------------------ | -------- |
+| StyleSheetPropType(View Style props) | No |
+
+---
+
+### `disableScrollViewPanResponder`
+
+When true, the default JS pan responder on the ScrollView is disabled, and full control over touches inside the ScrollView is left to its child components. This is particularly useful if `snapToInterval` is enabled, since it does not follow typical touch patterns. Do not use this on regular ScrollView use cases without `snapToInterval` as it may cause unexpected touches to occur while scrolling. The default value is false.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `keyboardDismissMode`
+
+Determines whether the keyboard gets dismissed in response to a drag.
+
+_Cross platform_
+
+* `'none'` (the default), drags do not dismiss the keyboard.
+* `'on-drag'`, the keyboard is dismissed when a drag begins.
+
+_iOS Only_
+
+* `'interactive'`, the keyboard is dismissed interactively with the drag and moves in synchrony with the touch; dragging upwards cancels the dismissal. On android this is not supported and it will have the same behavior as 'none'.
+
+| Type | Required |
+| -------------------------------------- | -------- |
+| enum('none', 'on-drag', 'interactive') | No |
+
+---
+
+### `keyboardShouldPersistTaps`
+
+Determines when the keyboard should stay visible after a tap.
+
+* `'never'` (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.
+* `'always'`, the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps.
+* `'handled'`, the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor).
+* `false`, deprecated, use 'never' instead
+* `true`, deprecated, use 'always' instead
+
+| Type | Required |
+| ----------------------------------------------- | -------- |
+| enum('always', 'never', 'handled', false, true) | No |
+
+---
+
+### `onContentSizeChange`
+
+Called when scrollable content view of the ScrollView changes.
+
+Handler function is passed the content width and content height as parameters: `(contentWidth, contentHeight)`
+
+It's implemented using onLayout handler attached to the content container which this ScrollView renders.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onMomentumScrollBegin`
+
+Called when the momentum scroll starts (scroll which occurs as the ScrollView glides to a stop).
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onMomentumScrollEnd`
+
+Called when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop).
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onScroll`
+
+Fires at most once per frame during scrolling. The frequency of the events can be controlled using the `scrollEventThrottle` prop.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onScrollBeginDrag`
+
+Called when the user begins to drag the scroll view.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onScrollEndDrag`
+
+Called when the user stops dragging the scroll view and it either stops or begins to glide.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `pagingEnabled`
+
+When true, the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default value is false.
+
+Note: Vertical pagination is not supported on Android.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `refreshControl`
+
+A RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView. Only works for vertical ScrollViews (`horizontal` prop must be `false`).
+
+See [RefreshControl](refreshcontrol.md).
+
+| Type | Required |
+| ------- | -------- |
+| element | No |
+
+---
+
+### `removeClippedSubviews`
+
+Experimental: When true, offscreen child views (whose `overflow` value is `hidden`) are removed from their native backing superview when offscreen. This can improve scrolling performance on long lists. The default value is true.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `scrollEnabled`
+
+When false, the view cannot be scrolled via touch interaction. The default value is true.
+
+Note that the view can always be scrolled by calling `scrollTo`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `showsHorizontalScrollIndicator`
+
+When true, shows a horizontal scroll indicator. The default value is true.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `showsVerticalScrollIndicator`
+
+When true, shows a vertical scroll indicator. The default value is true.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `stickyHeaderIndices`
+
+An array of child indices determining which children get docked to the top of the screen when scrolling. For example, passing `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction with `horizontal={true}`.
+
+| Type | Required |
+| --------------- | -------- |
+| array of number | No |
+
+---
+
+### `endFillColor`
+
+Sometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization that is not needed in the general case.
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | Android |
+
+---
+
+### `overScrollMode`
+
+Used to override default value of overScroll mode.
+
+Possible values:
+
+* `'auto'` - Default value, allow a user to over-scroll this view only if the content is large enough to meaningfully scroll.
+* `'always'` - Always allow a user to over-scroll this view.
+* `'never'` - Never allow a user to over-scroll this view.
+
+| Type | Required | Platform |
+| ------------------------------- | -------- | -------- |
+| enum('auto', 'always', 'never') | No | Android |
+
+---
+
+### `scrollPerfTag`
+
+Tag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native FpsListener for it to be useful.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| string | No | Android |
+
+---
+
+### `DEPRECATED_sendUpdatedChildFrames`
+
+When true, ScrollView will emit updateChildFrames data in scroll events, otherwise will not compute or emit child frame data. This only exists to support legacy issues, `onLayout` should be used instead to retrieve frame data. The default value is false.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `alwaysBounceHorizontal`
+
+When true, the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself. The default value is true when `horizontal={true}` and false otherwise.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `horizontal`
+
+When true, the scroll view's children are arranged horizontally in a row instead of vertically in a column. The default value is false.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `automaticallyAdjustContentInsets`
+
+Controls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/ toolbar. The default value is true.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `bounces`
+
+When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. When false, it disables all bouncing even if the `alwaysBounce*` props are true. The default value is true.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `bouncesZoom`
+
+When true, gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end, otherwise the zoom will not exceed the limits.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `canCancelContentTouches`
+
+When false, once tracking starts, won't try to drag if the touch moves. The default value is true.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `centerContent`
+
+When true, the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view, this property has no effect. The default value is false.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `contentInset`
+
+The amount by which the scroll view content is inset from the edges of the scroll view. Defaults to `{top: 0, left: 0, bottom: 0, right: 0}`.
+
+| Type | Required | Platform |
+| ------------------------------------------------------------------ | -------- | -------- |
+| object: {top: number, left: number, bottom: number, right: number} | No | iOS |
+
+---
+
+### `contentInsetAdjustmentBehavior`
+
+This property specifies how the safe area insets are used to modify the content area of the scroll view. The default value of this property is "never". Available on iOS 11 and later.
+
+| Type | Required | Platform |
+| ------------------------------------------------------ | -------- | -------- |
+| enum('automatic', 'scrollableAxes', 'never', 'always') | No | iOS |
+
+---
+
+### `contentOffset`
+
+Used to manually set the starting scroll offset. The default value is `{x: 0, y: 0}`.
+
+| Type | Required | Platform |
+| ------------- | -------- | -------- |
+| PointPropType | No | iOS |
+
+---
+
+### `decelerationRate`
+
+A floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. You may also use string shortcuts `"normal"` and `"fast"` which match the underlying iOS settings for `UIScrollViewDecelerationRateNormal` and `UIScrollViewDecelerationRateFast` respectively.
+
+* `'normal'`: 0.998 on iOS, 0.985 on Android (the default)
+* `'fast'`: 0.99 on iOS, 0.9 on Android
+
+| Type | Required |
+| ------------------------------- | -------- |
+| enum('fast', 'normal'), ,number | No |
+
+---
+
+### `directionalLockEnabled`
+
+When true, the ScrollView will try to lock to only vertical or horizontal scrolling while dragging. The default value is false.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `indicatorStyle`
+
+The style of the scroll indicators.
+
+* `'default'` (the default), same as `black`.
+* `'black'`, scroll indicator is black. This style is good against a light background.
+* `'white'`, scroll indicator is white. This style is good against a dark background.
+
+| Type | Required | Platform |
+| --------------------------------- | -------- | -------- |
+| enum('default', 'black', 'white') | No | iOS |
+
+---
+
+### `maximumZoomScale`
+
+The maximum allowed zoom scale. The default value is 1.0.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | iOS |
+
+---
+
+### `minimumZoomScale`
+
+The minimum allowed zoom scale. The default value is 1.0.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | iOS |
+
+---
+
+### `pinchGestureEnabled`
+
+When true, ScrollView allows use of pinch gestures to zoom in and out. The default value is true.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `scrollEventThrottle`
+
+This controls how often the scroll event will be fired while scrolling (as a time interval in ms). A lower number yields better accuracy for code that is tracking the scroll position, but can lead to scroll performance problems due to the volume of information being send over the bridge. You will not notice a difference between values set between 1-16 as the JS run loop is synced to the screen refresh rate. If you do not need precise scroll position tracking, set this value higher to limit the information being sent across the bridge. The default value is zero, which results in the scroll event being sent only once each time the view is scrolled.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | iOS |
+
+---
+
+### `scrollIndicatorInsets`
+
+The amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the `contentInset`. Defaults to `{0, 0, 0, 0}`.
+
+| Type | Required | Platform |
+| ------------------------------------------------------------------ | -------- | -------- |
+| object: {top: number, left: number, bottom: number, right: number} | No | iOS |
+
+---
+
+### `scrollsToTop`
+
+When true, the scroll view scrolls to top when the status bar is tapped. The default value is true.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `snapToAlignment`
+
+When `snapToInterval` is set, `snapToAlignment` will define the relationship of the snapping to the scroll view.
+
+* `'start'` (the default) will align the snap at the left (horizontal) or top (vertical)
+* `'center'` will align the snap in the center
+* `'end'` will align the snap at the right (horizontal) or bottom (vertical)
+
+| Type | Required |
+| ------------------------------ | -------- |
+| enum('start', 'center', 'end') | No |
+
+---
+
+### `snapToInterval`
+
+When set, causes the scroll view to stop at multiples of the value of `snapToInterval`. This can be used for paginating through children that have lengths smaller than the scroll view. Typically used in combination with `snapToAlignment` and `decelerationRate="fast"`. Overrides less configurable `pagingEnabled` prop.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `snapToOffsets`
+
+When set, causes the scroll view to stop at the defined offsets. This can be used for paginating through variously sized children that have lengths smaller than the scroll view. Typically used in combination with `decelerationRate="fast"`. Overrides less configurable `pagingEnabled` and `snapToInterval` props.
+
+| Type | Required |
+| --------------- | -------- |
+| array of number | No |
+
+---
+
+### `snapToStart`
+
+Use in conjuction with `snapToOffsets`. By default, the beginning of the list counts as a snap offset. Set `snapToStart` to false to disable this behavior and allow the list to scroll freely between its start and the first `snapToOffsets` offset. The default value is true.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `snapToEnd`
+
+Use in conjuction with `snapToOffsets`. By default, the end of the list counts as a snap offset. Set `snapToEnd` to false to disable this behavior and allow the list to scroll freely between its end and the last `snapToOffsets` offset. The default value is true.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `zoomScale`
+
+The current scale of the scroll view content. The default value is 1.0.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | iOS |
+
+---
+
+### `nestedScrollEnabled`
+
+Enables nested scrolling for Android API level 21+. Nested scrolling is supported by default on iOS.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+## Methods
+
+### `scrollTo()`
+
+```javascript
+scrollTo(
+ ([y]: number),
+ object,
+ ([x]: number),
+ ([animated]: boolean),
+ ([duration]: number),
+);
+```
+
+Scrolls to a given x, y offset, either immediately, with a smooth animation, or, for Android only, a custom animation duration time.
+
+Example:
+
+`scrollTo({x: 0, y: 0, animated: true})`
+
+Example with duration (Android only):
+
+`scrollTo({x: 0, y: 0, duration: 500})`
+
+Note: The weird function signature is due to the fact that, for historical reasons, the function also accepts separate arguments as an alternative to the options object. This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.
+
+---
+
+### `scrollToEnd()`
+
+```javascript
+scrollToEnd(([options]: {animated: boolean, duration: number}));
+```
+
+If this is a vertical ScrollView scrolls to the bottom. If this is a horizontal ScrollView scrolls to the right.
+
+Use `scrollToEnd({animated: true})` for smooth animated scrolling, `scrollToEnd({animated: false})` for immediate scrolling. For Android, you may specify a duration, e.g. `scrollToEnd({duration: 500})` for a controlled duration scroll. If no options are passed, `animated` defaults to true.
+
+---
+
+### `scrollWithoutAnimationTo()`
+
+```javascript
+scrollWithoutAnimationTo(y, x);
+```
+
+Deprecated, use `scrollTo` instead.
+
+---
+
+### `flashScrollIndicators()`
+
+```javascript
+flashScrollIndicators();
+```
+
+Displays the scroll indicators momentarily.
diff --git a/docs/sectionlist.md b/docs/sectionlist.md
new file mode 100644
index 0000000..e115396
--- /dev/null
+++ b/docs/sectionlist.md
@@ -0,0 +1,406 @@
+---
+id: sectionlist
+title: SectionList
+---
+
+A performant interface for rendering sectioned lists, supporting the most handy features:
+
+* Fully cross-platform.
+* Configurable viewability callbacks.
+* List header support.
+* List footer support.
+* Item separator support.
+* Section header support.
+* Section separator support.
+* Heterogeneous data and item rendering support.
+* Pull to Refresh.
+* Scroll loading.
+
+If you don't need section support and want a simpler interface, use [``](flatlist.md).
+
+Simple Examples:
+
+```javascript
+// Example 1 (Homogeneous Rendering)
+{item}}
+ renderSectionHeader={({section: {title}}) => (
+ {title}
+ )}
+ sections={[
+ {title: 'Title1', data: ['item1', 'item2']},
+ {title: 'Title2', data: ['item3', 'item4']},
+ {title: 'Title3', data: ['item5', 'item6']},
+ ]}
+ keyExtractor={(item, index) => item + index}
+/>
+```
+
+```javascript
+// Example 2 (Heterogeneous Rendering / No Section Headers)
+const overrideRenderItem = ({ item, index, section: { title, data } }) => Override{item}
+
+{item}}
+ sections={[
+ { title: 'Title1', data: ['item1', 'item2'], renderItem: overrideRenderItem },
+ { title: 'Title2', data: ['item3', 'item4'] },
+ { title: 'Title3', data: ['item5', 'item6'] },
+ ]}
+/>
+```
+
+This is a convenience wrapper around [``](virtualizedlist.md), and thus inherits its props (as well as those of [``](scrollview.md) that aren't explicitly listed here, along with the following caveats:
+
+* Internal state is not preserved when content scrolls out of the render window. Make sure all your data is captured in the item data or external stores like Flux, Redux, or Relay.
+* This is a `PureComponent` which means that it will not re-render if `props` remain shallow- equal. Make sure that everything your `renderItem` function depends on is passed as a prop (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on changes. This includes the `data` prop and parent component state.
+* In order to constrain memory and enable smooth scrolling, content is rendered asynchronously offscreen. This means it's possible to scroll faster than the fill rate and momentarily see blank content. This is a tradeoff that can be adjusted to suit the needs of each application, and we are working on improving it behind the scenes.
+* By default, the list looks for a `key` prop on each item and uses that for the React key. Alternatively, you can provide a custom `keyExtractor` prop.
+
+### Props
+
+* [`ScrollView` props...](scrollview.md#props)
+
+Required props:
+
+* [`sections`](sectionlist.md#sections)
+* [`renderItem`](sectionlist.md#renderitem)
+
+Optional props:
+
+* [`initialNumToRender`](sectionlist.md#initialnumtorender)
+* [`keyExtractor`](sectionlist.md#keyextractor)
+* [`onEndReached`](sectionlist.md#onendreached)
+* [`extraData`](sectionlist.md#extradata)
+* [`ItemSeparatorComponent`](sectionlist.md#itemseparatorcomponent)
+* [`inverted`](sectionlist.md#inverted)
+* [`ListFooterComponent`](sectionlist.md#listfootercomponent)
+* [`legacyImplementation`](sectionlist.md#legacyimplementation)
+* [`ListEmptyComponent`](sectionlist.md#listemptycomponent)
+* [`onEndReachedThreshold`](sectionlist.md#onendreachedthreshold)
+* [`onRefresh`](sectionlist.md#onrefresh)
+* [`onViewableItemsChanged`](sectionlist.md#onviewableitemschanged)
+* [`refreshing`](sectionlist.md#refreshing)
+* [`removeClippedSubviews`](sectionlist.md#removeclippedsubviews)
+* [`ListHeaderComponent`](sectionlist.md#listheadercomponent)
+* [`renderSectionFooter`](sectionlist.md#rendersectionfooter)
+* [`renderSectionHeader`](sectionlist.md#rendersectionheader)
+* [`SectionSeparatorComponent`](sectionlist.md#sectionseparatorcomponent)
+* [`stickySectionHeadersEnabled`](sectionlist.md#stickysectionheadersenabled)
+
+### Methods
+
+* [`scrollToLocation`](sectionlist.md#scrolltolocation)
+* [`recordInteraction`](sectionlist.md#recordinteraction)
+* [`flashScrollIndicators`](sectionlist.md#flashscrollindicators)
+
+### Type Definitions
+
+* [`Section`](sectionlist.md#section)
+
+---
+
+# Reference
+
+## Props
+
+### `sections`
+
+The actual data to render, akin to the `data` prop in [`FlatList`](flatlist.md).
+
+| Type | Required |
+| ------------------------------------------- | -------- |
+| array of [Section](sectionlist.md#section)s | Yes |
+
+---
+
+### `initialNumToRender`
+
+How many items to render in the initial batch. This should be enough to fill the screen but not much more. Note these items will never be unmounted as part of the windowed rendering in order to improve perceived performance of scroll-to-top actions.
+
+| Type | Required |
+| ------ | -------- |
+| number | Yes |
+
+---
+
+### `keyExtractor`
+
+Used to extract a unique key for a given item at the specified index. Key is used for caching and as the react key to track item re-ordering. The default extractor checks item.key, then falls back to using the index, like react does. Note that this sets keys for each item, but each overall section still needs its own key.
+
+| Type | Required |
+| ------------------------------------- | -------- |
+| (item: Item, index: number) => string | Yes |
+
+---
+
+### `renderItem`
+
+Default renderer for every item in every section. Can be over-ridden on a per-section basis. Should return a React element.
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+The render function will be passed an object with the following keys:
+
+* 'item' (object) - the item object as specified in this section's `data` key
+* 'index' (number) - Item's index within the section.
+* 'section' (object) - The full section object as specified in `sections`.
+* 'separators' (object) - An object with the following keys:
+ * 'highlight' (function) - `() => void`
+ * 'unhighlight' (function) - `() => void`
+ * 'updateProps' (function) - `(select, newProps) => void`
+ * 'select' (enum) - possible values are 'leading', 'trailing'
+ * 'newProps' (object)
+
+---
+
+### `onEndReached`
+
+Called once when the scroll position gets within `onEndReachedThreshold` of the rendered content.
+
+| Type | Required |
+| ------------------------------------------- | -------- |
+| [(info: {distanceFromEnd: number}) => void] | No |
+
+---
+
+### `extraData`
+
+A marker property for telling the list to re-render (since it implements `PureComponent`). If any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the `data` prop, stick it here and treat it immutably.
+
+| Type | Required |
+| ---- | -------- |
+| any | No |
+
+---
+
+### `ItemSeparatorComponent`
+
+Rendered in between each item, but not at the top or bottom. By default, `highlighted`, `section`, and `[leading/trailing][Item/Separator]` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`.
+
+| Type | Required |
+| ------------------------------ | -------- |
+| [component, function, element] | No |
+
+---
+
+### `inverted`
+
+Reverses the direction of scroll. Uses scale transforms of -1.
+
+| Type | Required |
+| --------- | -------- |
+| [boolean] | No |
+
+---
+
+### `ListFooterComponent`
+
+Rendered at the very end of the list. Can be a React Component Class, a render function, or a rendered element.
+
+| Type | Required |
+| ------------------------------ | -------- |
+| [component, function, element] | No |
+
+---
+
+### `legacyImplementation`
+
+| Type | Required |
+| --------- | -------- |
+| [boolean] | No |
+
+---
+
+### `ListEmptyComponent`
+
+Rendered when the list is empty. Can be a React Component Class, a render function, or a rendered element.
+
+| Type | Required |
+| ------------------------------ | -------- |
+| [component, function, element] | No |
+
+---
+
+### `onEndReachedThreshold`
+
+How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the `onEndReached` callback. Thus a value of 0.5 will trigger `onEndReached` when the end of the content is within half the visible length of the list.
+
+| Type | Required |
+| -------- | -------- |
+| [number] | No |
+
+---
+
+### `onRefresh`
+
+If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the `refreshing` prop correctly. To offset the RefreshControl from the top (e.g. by 100 pts), use `progressViewOffset={100}`.
+
+| Type | Required |
+| ------------ | -------- |
+| [() => void] | No |
+
+---
+
+### `onViewableItemsChanged`
+
+Called when the viewability of rows changes, as defined by the `viewabilityConfig` prop.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+The function will be passed an object with the following keys:
+
+* 'viewableItems' (array of `ViewToken`s)
+* 'changed' (array of `ViewToken`s)
+
+The `ViewToken` type is exported by `ViewabilityHelper.js`:
+
+| Name | Type | Required |
+| ---------- | ------- | -------- |
+| item | any | Yes |
+| key | string | Yes |
+| index | number | No |
+| isViewable | boolean | Yes |
+| section | any | No |
+
+---
+
+### `refreshing`
+
+Set this true while waiting for new data from a refresh.
+
+| Type | Required |
+| --------- | -------- |
+| [boolean] | No |
+
+---
+
+### `removeClippedSubviews`
+
+Note: may have bugs (missing content) in some circumstances - use at your own risk.
+
+This may improve scroll performance for large lists.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `ListHeaderComponent`
+
+Rendered at the very beginning of the list. Can be a React Component Class, a render function, or a rendered element.
+
+| Type | Required |
+| ---------------------------- | -------- |
+| component, function, element | No |
+
+---
+
+### `renderSectionFooter`
+
+Rendered at the bottom of each section.
+
+| Type | Required |
+| ---------------------------------------------------- | -------- |
+| [(info: {section: SectionT}) => ?React.Element] | No |
+
+---
+
+### `renderSectionHeader`
+
+Rendered at the top of each section. These stick to the top of the `ScrollView` by default on iOS. See `stickySectionHeadersEnabled`.
+
+| Type | Required |
+| ---------------------------------------------------- | -------- |
+| [(info: {section: SectionT}) => ?React.Element] | No |
+
+---
+
+### `SectionSeparatorComponent`
+
+Rendered at the top and bottom of each section (note this is different from `ItemSeparatorComponent` which is only rendered between items). These are intended to separate sections from the headers above and below and typically have the same highlight response as `ItemSeparatorComponent`. Also receives `highlighted`, `[leading/trailing][Item/Separator]`, and any custom props from `separators.updateProps`.
+
+| Type | Required |
+| ----------------- | -------- |
+| [ReactClass] | No |
+
+---
+
+### `stickySectionHeadersEnabled`
+
+Makes section headers stick to the top of the screen until the next one pushes it off. Only enabled by default on iOS because that is the platform standard there.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+## Methods
+
+### `scrollToLocation()`
+
+```javascript
+scrollToLocation(params);
+```
+
+Scrolls to the item at the specified `sectionIndex` and `itemIndex` (within the section) positioned in the viewable area such that `viewPosition` 0 places it at the top (and may be covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle.
+
+> Note: Cannot scroll to locations outside the render window without specifying the `getItemLayout` or `onScrollToIndexFailed` prop.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ----------- |
+| params | object | Yes | See below. |
+
+Valid `params` keys are:
+
+* 'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to `true`.
+* 'itemIndex' (number) - Index within section for the item to scroll to. Required.
+* 'sectionIndex' (number) - Index for section that contains the item to scroll to. Required.
+* 'viewOffset' (number) - A fixed number of pixels to offset the final target position, e.g. to compensate for sticky headers.
+* 'viewPosition' (number) - A value of `0` places the item specified by index at the top, `1` at the bottom, and `0.5` centered in the middle.
+
+---
+
+### `recordInteraction()`
+
+```javascript
+recordInteraction();
+```
+
+Tells the list an interaction has occured, which should trigger viewability calculations, e.g. if `waitForInteractions` is true and the user has not scrolled. This is typically called by taps on items or by navigation actions.
+
+---
+
+### `flashScrollIndicators()`
+
+```javascript
+flashScrollIndicators();
+```
+
+Displays the scroll indicators momentarily.
+
+## Type Definitions
+
+### Section
+
+An object that identifies the data to be rendered for a given section.
+
+| Type |
+| ---- |
+| any |
+
+**Properties:**
+
+| Name | Type | Description |
+| ------------------------ | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| data | array | The data for rendering items in this section. Array of objects, much like [`FlatList`'s data prop](flatlist.md#data). |
+| [key] | string | Optional key to keep track of section re-ordering. If you don't plan on re-ordering sections, the array index will be used by default. |
+| [renderItem] | function | Optionally define an arbitrary item renderer for this section, overriding the default [`renderItem`](sectionlist.md#renderitem) for the list. |
+| [ItemSeparatorComponent] | component, function, element | Optionally define an arbitrary item separator for this section, overriding the default [`ItemSeparatorComponent`](sectionlist.md#itemseparatorcomponent) for the list. |
+| [keyExtractor] | function | Optionally define an arbitrary key extractor for this section, overriding the default [`keyExtractor`](sectionlist.md#keyextractor). |
diff --git a/docs/segmentedcontrolios.md b/docs/segmentedcontrolios.md
new file mode 100644
index 0000000..13a191e
--- /dev/null
+++ b/docs/segmentedcontrolios.md
@@ -0,0 +1,116 @@
+---
+id: segmentedcontrolios
+title: SegmentedControlIOS
+---
+
+Use `SegmentedControlIOS` to render a UISegmentedControl iOS.
+
+#### Programmatically changing selected index
+
+The selected index can be changed on the fly by assigning the selectedIndex prop to a state variable, then changing that variable. Note that the state variable would need to be updated as the user selects a value and changes the index, as shown in the example below.
+
+## Example
+
+```javascript
+ {
+ this.setState({selectedIndex: event.nativeEvent.selectedSegmentIndex});
+ }}
+/>
+```
+
+
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`enabled`](segmentedcontrolios.md#enabled)
+- [`momentary`](segmentedcontrolios.md#momentary)
+- [`onChange`](segmentedcontrolios.md#onchange)
+- [`onValueChange`](segmentedcontrolios.md#onvaluechange)
+- [`selectedIndex`](segmentedcontrolios.md#selectedindex)
+- [`tintColor`](segmentedcontrolios.md#tintcolor)
+- [`values`](segmentedcontrolios.md#values)
+
+---
+
+# Reference
+
+## Props
+
+### `enabled`
+
+If false the user won't be able to interact with the control. Default value is true.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+
+
+---
+
+### `momentary`
+
+If true, then selecting a segment won't persist visually. The `onValueChange` callback will still work as expected.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+
+
+---
+
+### `onChange`
+
+Callback that is called when the user taps a segment; passes the event as an argument
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onValueChange`
+
+Callback that is called when the user taps a segment; passes the segment's value as an argument
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `selectedIndex`
+
+The index in `props.values` of the segment to be (pre)selected.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `tintColor`
+
+Accent color of the control.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+
+
+---
+
+### `values`
+
+The labels for the control's segment buttons, in order.
+
+| Type | Required |
+| --------------- | -------- |
+| array of string | No |
diff --git a/docs/settings.md b/docs/settings.md
new file mode 100644
index 0000000..a262a09
--- /dev/null
+++ b/docs/settings.md
@@ -0,0 +1,57 @@
+---
+id: settings
+title: Settings
+---
+
+`Settings` serves as a wrapper for [`NSUserDefaults`](https://developer.apple.com/documentation/foundation/nsuserdefaults), a persistent key-value store available only on iOS.
+
+### Methods
+
+* [`get`](settings.md#get)
+* [`set`](settings.md#set)
+* [`watchKeys`](settings.md#watchkeys)
+* [`clearWatch`](settings.md#clearwatch)
+
+---
+
+# Reference
+
+## Methods
+
+### `get()`
+
+```javascript
+static get(key)
+```
+
+Get the current value for a key in `NSUserDefaults`.
+
+---
+
+### `set()`
+
+```javascript
+static set(settings)
+```
+
+Set one or more values in `NSUserDefaults`.
+
+---
+
+### `watchKeys()`
+
+```javascript
+static watchKeys(keys, callback)
+```
+
+Subscribe to be notified when the value for any of the keys specified by the `keys` array changes in `NSUserDefaults`. Returns a `watchId` number that may be used with `clearWatch()` to unsubscribe.
+
+---
+
+### `clearWatch()`
+
+```javascript
+static clearWatch(watchId)
+```
+
+`watchId` is the number returned by `watchKeys()` when the subscription was originally configured.
diff --git a/docs/shadow-props.md b/docs/shadow-props.md
new file mode 100644
index 0000000..1dcc060
--- /dev/null
+++ b/docs/shadow-props.md
@@ -0,0 +1,55 @@
+---
+id: shadow-props
+title: Shadow Props
+---
+
+### Props
+
+* [`shadowColor`](shadow-props.md#shadowcolor)
+* [`shadowOffset`](shadow-props.md#shadowoffset)
+* [`shadowOpacity`](shadow-props.md#shadowopacity)
+* [`shadowRadius`](shadow-props.md#shadowradius)
+
+---
+
+# Reference
+
+## Props
+
+### `shadowColor`
+
+Sets the drop shadow color
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | iOS |
+
+---
+
+### `shadowOffset`
+
+Sets the drop shadow offset
+
+| Type | Required | Platform |
+| -------------------------------------- | -------- | -------- |
+| object: {width: number,height: number} | No | iOS |
+
+---
+
+### `shadowOpacity`
+
+Sets the drop shadow opacity (multiplied by the color's alpha component)
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | iOS |
+
+---
+
+### `shadowRadius`
+
+Sets the drop shadow blur radius
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | iOS |
diff --git a/docs/share.md b/docs/share.md
new file mode 100644
index 0000000..c1ca259
--- /dev/null
+++ b/docs/share.md
@@ -0,0 +1,105 @@
+---
+id: share
+title: Share
+---
+
+### Methods
+
+* [`share`](share.md#share)
+* [`sharedAction`](share.md#sharedaction)
+* [`dismissedAction`](share.md#dismissedaction)
+
+---
+
+# Reference
+
+## Methods
+
+### `share()`
+
+```javascript
+static share(content, options)
+```
+
+Open a dialog to share text content.
+
+In iOS, Returns a Promise which will be invoked an object containing `action`, `activityType`. If the user dismissed the dialog, the Promise will still be resolved with action being `Share.dismissedAction` and all the other keys being undefined.
+
+In Android, Returns a Promise which always be resolved with action being `Share.sharedAction`.
+
+### Content
+
+* `message` - a message to share
+* `title` - title of the message
+
+#### iOS
+
+* `url` - an URL to share
+
+At least one of URL and message is required.
+
+### Options
+
+#### iOS
+
+* `subject` - a subject to share via email
+* `excludedActivityTypes`
+* `tintColor`
+
+#### Android
+
+* `dialogTitle`
+
+---
+
+### `sharedAction()`
+
+```javascript
+static sharedAction()
+```
+
+The content was successfully shared.
+
+---
+
+### `dismissedAction()`
+
+```javascript
+static dismissedAction()
+```
+
+_iOS Only_. The dialog has been dismissed.
+
+## Basic Example
+
+```javascript
+import React, {Component} from 'react';
+import {Share, Button} from 'react-native';
+
+class ShareExample extends Component {
+ onShare = async () => {
+ try {
+ const result = await Share.share({
+ message:
+ 'React Native | A framework for building native apps using React',
+ });
+
+ if (result.action === Share.sharedAction) {
+ if (result.activityType) {
+ // shared with activity type of result.activityType
+ } else {
+ // shared
+ }
+ } else if (result.action === Share.dismissedAction) {
+ // dismissed
+ }
+ } catch (error) {
+ alert(error.message);
+ }
+ };
+
+ render() {
+ return ;
+ }
+}
+```
diff --git a/docs/signed-apk-android.md b/docs/signed-apk-android.md
new file mode 100644
index 0000000..63743d4
--- /dev/null
+++ b/docs/signed-apk-android.md
@@ -0,0 +1,142 @@
+---
+id: signed-apk-android
+title: Generating Signed APK
+---
+
+Android requires that all apps be digitally signed with a certificate before they can be installed, so to distribute your Android application via [Google Play store](https://play.google.com/store), you'll need to generate a signed release APK. The [Signing Your Applications](https://developer.android.com/tools/publishing/app-signing.html) page on Android Developers documentation describes the topic in detail. This guide covers the process in brief, as well as lists the steps required to package the JavaScript bundle.
+
+### Generating a signing key
+
+You can generate a private signing key using `keytool`. On Windows `keytool` must be run from `C:\Program Files\Java\jdkx.x.x_x\bin`.
+
+ $ keytool -genkeypair -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
+
+This command prompts you for passwords for the keystore and key and for the Distinguished Name fields for your key. It then generates the keystore as a file called `my-release-key.keystore`.
+
+The keystore contains a single key, valid for 10000 days. The alias is a name that you will use later when signing your app, so remember to take note of the alias.
+
+On Mac, if you're not sure where your jdk bin folder is, then perform the following command to find it:
+
+ $ /usr/libexec/java_home
+
+It will output the directory of the jdk, which will look something like this:
+
+ /Library/Java/JavaVirtualMachines/jdkX.X.X_XXX.jdk/Contents/Home
+
+Navigate to that directory by using the command `$ cd /your/jdk/path` and use the keytool command with sudo permission as shown below.
+
+ $ sudo keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
+
+_Note: Remember to keep your keystore file private and never commit it to version control._
+
+### Setting up gradle variables
+
+1. Place the `my-release-key.keystore` file under the `android/app` directory in your project folder.
+2. Edit the file `~/.gradle/gradle.properties` or `android/gradle.properties`, and add the following (replace `*****` with the correct keystore password, alias and key password),
+
+```
+MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
+MYAPP_RELEASE_KEY_ALIAS=my-key-alias
+MYAPP_RELEASE_STORE_PASSWORD=*****
+MYAPP_RELEASE_KEY_PASSWORD=*****
+```
+
+These are going to be global gradle variables, which we can later use in our gradle config to sign our app.
+
+> **Note about saving the keystore:**
+
+> Once you publish the app on the Play Store, you will need to republish your app under a different package name (losing all downloads and ratings) if you want to change the signing key at any point. So backup your keystore and don't forget the passwords.
+
+_Note about security: If you are not keen on storing your passwords in plaintext, and you are running OSX, you can also [store your credentials in the Keychain Access app](https://pilloxa.gitlab.io/posts/safer-passwords-in-gradle/). Then you can skip the two last rows in `~/.gradle/gradle.properties`._
+
+### Adding signing config to your app's gradle config
+
+Edit the file `android/app/build.gradle` in your project folder, and add the signing config,
+
+```gradle
+...
+android {
+ ...
+ defaultConfig { ... }
+ signingConfigs {
+ release {
+ if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
+ storeFile file(MYAPP_RELEASE_STORE_FILE)
+ storePassword MYAPP_RELEASE_STORE_PASSWORD
+ keyAlias MYAPP_RELEASE_KEY_ALIAS
+ keyPassword MYAPP_RELEASE_KEY_PASSWORD
+ }
+ }
+ }
+ buildTypes {
+ release {
+ ...
+ signingConfig signingConfigs.release
+ }
+ }
+}
+...
+```
+
+### Generating the release APK
+
+Simply run the following in a terminal:
+
+```sh
+$ cd android
+$ ./gradlew assembleRelease
+```
+
+Gradle's `assembleRelease` will bundle all the JavaScript needed to run your app into the APK. If you need to change the way the JavaScript bundle and/or drawable resources are bundled (e.g. if you changed the default file/folder names or the general structure of the project), have a look at `android/app/build.gradle` to see how you can update it to reflect these changes.
+
+> Note: Make sure gradle.properties does not include _org.gradle.configureondemand=true_ as that will make the release build skip bundling JS and assets into the APK.
+
+The generated APK can be found under `android/app/build/outputs/apk/release/app-release.apk`, and is ready to be distributed.
+
+### Testing the release build of your app
+
+Before uploading the release build to the Play Store, make sure you test it thoroughly. First uninstall any previous version of the app you already have installed. Install it on the device using:
+
+```sh
+$ react-native run-android --variant=release
+```
+
+Note that `--variant=release` is only available if you've set up signing as described above.
+
+You can kill any running packager instances, since all your framework and JavaScript code is bundled in the APK's assets.
+
+### Split APKs by ABI to reduce file size
+
+By default, the generated APK has the native code for both x86 and ARMv7a CPU architectures. This makes it easier to share APKs that run on almost all Android devices. However, this has the downside that there will be some unused native code on any device, leading to unnecessarily bigger APKs.
+
+You can create an APK for each CPU by changing the following line in android/app/build.gradle:
+
+```diff
+- ndk {
+- abiFilters "armeabi-v7a", "x86"
+- }
+- def enableSeparateBuildPerCPUArchitecture = false
++ def enableSeparateBuildPerCPUArchitecture = true
+```
+
+Upload both these files to markets which support device targetting, such as [Google Play](https://developer.android.com/google/play/publishing/multiple-apks.html) and [Amazon AppStore](https://developer.amazon.com/docs/app-submission/getting-started-with-device-targeting.html), and the users will automatically get the appropriate APK. If you want to upload to other markets, such as [APKFiles](https://www.apkfiles.com/), which do not support multiple APKs for a single app, change the following line as well to create the default universal APK with binaries for both CPUs.
+
+```diff
+- universalApk false // If true, also generate a universal APK
++ universalApk true // If true, also generate a universal APK
+```
+
+### Enabling Proguard to reduce the size of the APK (optional)
+
+Proguard is a tool that can slightly reduce the size of the APK. It does this by stripping parts of the React Native Java bytecode (and its dependencies) that your app is not using.
+
+_**IMPORTANT**: Make sure to thoroughly test your app if you've enabled Proguard. Proguard often requires configuration specific to each native library you're using. See `app/proguard-rules.pro`._
+
+To enable Proguard, edit `android/app/build.gradle`:
+
+```gradle
+/**
+ * Run Proguard to shrink the Java bytecode in release builds.
+ */
+def enableProguardInReleaseBuilds = true
+```
diff --git a/docs/slider.md b/docs/slider.md
new file mode 100644
index 0000000..cefdbea
--- /dev/null
+++ b/docs/slider.md
@@ -0,0 +1,193 @@
+---
+id: slider
+title: Slider
+---
+
+A component used to select a single value from a range of values.
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`style`](slider.md#style)
+- [`disabled`](slider.md#disabled)
+- [`maximumValue`](slider.md#maximumvalue)
+- [`minimumTrackTintColor`](slider.md#minimumtracktintcolor)
+- [`minimumValue`](slider.md#minimumvalue)
+- [`onSlidingComplete`](slider.md#onslidingcomplete)
+- [`onValueChange`](slider.md#onvaluechange)
+- [`step`](slider.md#step)
+- [`maximumTrackTintColor`](slider.md#maximumtracktintcolor)
+- [`testID`](slider.md#testid)
+- [`value`](slider.md#value)
+- [`thumbTintColor`](slider.md#thumbtintcolor)
+- [`maximumTrackImage`](slider.md#maximumtrackimage)
+- [`minimumTrackImage`](slider.md#minimumtrackimage)
+- [`thumbImage`](slider.md#thumbimage)
+- [`trackImage`](slider.md#trackimage)
+
+---
+
+# Reference
+
+## Props
+
+### `style`
+
+Used to style and layout the `Slider`. See `StyleSheet.js` and `ViewStylePropTypes.js` for more info.
+
+| Type | Required |
+| ---------- | -------- |
+| View.style | No |
+
+---
+
+### `disabled`
+
+If true the user won't be able to move the slider. Default value is false.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `maximumValue`
+
+Initial maximum value of the slider. Default value is 1.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `minimumTrackTintColor`
+
+The color used for the track to the left of the button. Overrides the default blue gradient image on iOS.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `minimumValue`
+
+Initial minimum value of the slider. Default value is 0.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `onSlidingComplete`
+
+Callback that is called when the user releases the slider, regardless if the value has changed. The current value is passed as an argument to the callback handler.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onValueChange`
+
+Callback continuously called while the user is dragging the slider.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `step`
+
+Step value of the slider. The value should be between 0 and (maximumValue - minimumValue). Default value is 0.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `maximumTrackTintColor`
+
+The color used for the track to the right of the button. Overrides the default gray gradient image on iOS.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `testID`
+
+Used to locate this view in UI automation tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `value`
+
+Initial value of the slider. The value should be between minimumValue and maximumValue, which default to 0 and 1 respectively. Default value is 0.
+
+_This is not a controlled component_, you don't need to update the value during dragging.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `thumbTintColor`
+
+Color of the foreground switch grip.
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | Android |
+
+---
+
+### `maximumTrackImage`
+
+Assigns a maximum track image. Only static images are supported. The leftmost pixel of the image will be stretched to fill the track.
+
+| Type | Required | Platform |
+| ---------------------- | -------- | -------- |
+| Image.propTypes.source | No | iOS |
+
+---
+
+### `minimumTrackImage`
+
+Assigns a minimum track image. Only static images are supported. The rightmost pixel of the image will be stretched to fill the track.
+
+| Type | Required | Platform |
+| ---------------------- | -------- | -------- |
+| Image.propTypes.source | No | iOS |
+
+---
+
+### `thumbImage`
+
+Sets an image for the thumb. Only static images are supported.
+
+| Type | Required | Platform |
+| ---------------------- | -------- | -------- |
+| Image.propTypes.source | No | iOS |
+
+---
+
+### `trackImage`
+
+Assigns a single image for the track. Only static images are supported. The center pixel of the image will be stretched to fill the track.
+
+| Type | Required | Platform |
+| ---------------------- | -------- | -------- |
+| Image.propTypes.source | No | iOS |
diff --git a/docs/snapshotviewios.md b/docs/snapshotviewios.md
new file mode 100644
index 0000000..ca86ae5
--- /dev/null
+++ b/docs/snapshotviewios.md
@@ -0,0 +1,31 @@
+---
+id: snapshotviewios
+title: SnapshotViewIOS
+---
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`onSnapshotReady`](snapshotviewios.md#onsnapshotready)
+- [`testIdentifier`](snapshotviewios.md#testidentifier)
+
+---
+
+# Reference
+
+## Props
+
+### `onSnapshotReady`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `testIdentifier`
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
diff --git a/docs/state.md b/docs/state.md
new file mode 100644
index 0000000..2df48e2
--- /dev/null
+++ b/docs/state.md
@@ -0,0 +1,61 @@
+---
+id: state
+title: State
+---
+
+There are two types of data that control a component: `props` and `state`. `props` are set by the parent and they are fixed throughout the lifetime of a component. For data that is going to change, we have to use `state`.
+
+In general, you should initialize `state` in the constructor, and then call `setState` when you want to change it.
+
+For example, let's say we want to make text that blinks all the time. The text itself gets set once when the blinking component gets created, so the text itself is a `prop`. The "whether the text is currently on or off" changes over time, so that should be kept in `state`.
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, Text, View } from 'react-native';
+
+class Blink extends Component {
+ constructor(props) {
+ super(props);
+ this.state = { isShowingText: true };
+
+ // Toggle the state every second
+ setInterval(() => (
+ this.setState(previousState => (
+ { isShowingText: !previousState.isShowingText }
+ ))
+ ), 1000);
+ }
+
+ render() {
+ if (!this.state.isShowingText) {
+ return null;
+ }
+
+ return (
+ {this.props.text}
+ );
+ }
+}
+
+export default class BlinkApp extends Component {
+ render() {
+ return (
+
+
+
+
+
+
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => BlinkApp);
+```
+
+In a real application, you probably won't be setting state with a timer. You might set state when you have new data from the server, or from user input. You can also use a state container like [Redux](https://redux.js.org/) or [Mobx](https://mobx.js.org/) to control your data flow. In that case you would use Redux or Mobx to modify your state rather than calling `setState` directly.
+
+When setState is called, BlinkApp will re-render its Component. By calling setState within the Timer, the component will re-render every time the Timer ticks.
+
+State works the same way as it does in React, so for more details on handling state, you can look at the [React.Component API](https://reactjs.org/docs/react-component.html#setstate). At this point, you might be annoyed that most of our examples so far use boring default black text. To make things more beautiful, you will have to [learn about Style](style.md).
diff --git a/docs/statusbar.md b/docs/statusbar.md
new file mode 100644
index 0000000..ea5fe10
--- /dev/null
+++ b/docs/statusbar.md
@@ -0,0 +1,244 @@
+---
+id: statusbar
+title: StatusBar
+---
+
+Component to control the app status bar.
+
+### Usage with Navigator
+
+It is possible to have multiple `StatusBar` components mounted at the same time. The props will be merged in the order the `StatusBar` components were mounted.
+
+```javascript
+
+
+
+
+ ...
+
+
+```
+
+### Imperative API
+
+For cases where using a component is not ideal, there is also an imperative API exposed as static functions on the component. It is however not recommended to use the static API and the component for the same prop because any value set by the static API will get overriden by the one set by the component in the next render.
+
+### Constants
+
+`currentHeight` (Android only) The height of the status bar.
+
+### Props
+
+* [`animated`](statusbar.md#animated)
+* [`barStyle`](statusbar.md#barstyle)
+* [`hidden`](statusbar.md#hidden)
+* [`backgroundColor`](statusbar.md#backgroundcolor)
+* [`translucent`](statusbar.md#translucent)
+* [`networkActivityIndicatorVisible`](statusbar.md#networkactivityindicatorvisible)
+* [`showHideTransition`](statusbar.md#showhidetransition)
+
+### Methods
+
+* [`setHidden`](statusbar.md#sethidden)
+* [`setBarStyle`](statusbar.md#setbarstyle)
+* [`setNetworkActivityIndicatorVisible`](statusbar.md#setnetworkactivityindicatorvisible)
+* [`setBackgroundColor`](statusbar.md#setbackgroundcolor)
+* [`setTranslucent`](statusbar.md#settranslucent)
+
+### Type Definitions
+
+* [`StatusBarStyle`](statusbar.md#statusbarstyle)
+* [`StatusBarAnimation`](statusbar.md#statusbaranimation)
+
+---
+
+# Reference
+
+## Props
+
+### `animated`
+
+If the transition between status bar property changes should be animated. Supported for backgroundColor, barStyle and hidden.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `barStyle`
+
+Sets the color of the status bar text.
+
+| Type | Required |
+| ------------------------------------------------ | -------- |
+| enum('default', 'light-content', 'dark-content') | No |
+
+---
+
+### `hidden`
+
+If the status bar is hidden.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `backgroundColor`
+
+The background color of the status bar.
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | Android |
+
+---
+
+### `translucent`
+
+If the status bar is translucent. When translucent is set to true, the app will draw under the status bar. This is useful when using a semi transparent status bar color.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `networkActivityIndicatorVisible`
+
+If the network activity indicator should be visible.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `showHideTransition`
+
+The transition effect when showing and hiding the status bar using the `hidden` prop. Defaults to 'fade'.
+
+| Type | Required | Platform |
+| --------------------- | -------- | -------- |
+| enum('fade', 'slide') | No | iOS |
+
+## Methods
+
+### `setHidden()`
+
+```javascript
+static setHidden(hidden: boolean, [animation]: StatusBarAnimation)
+```
+
+Show or hide the status bar
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| --------- | ----------------------------------------------------- | -------- | ---------------------------------------------------------------- |
+| hidden | boolean | Yes | Hide the status bar. |
+| animation | [StatusBarAnimation](statusbar.md#statusbaranimation) | No | Optional animation when changing the status bar hidden property. |
+
+---
+
+### `setBarStyle()`
+
+```javascript
+static setBarStyle(style: StatusBarStyle, [animated]: boolean)
+```
+
+Set the status bar style
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | --------------------------------------------- | -------- | ------------------------- |
+| style | [StatusBarStyle](statusbar.md#statusbarstyle) | Yes | Status bar style to set |
+| animated | boolean | No | Animate the style change. |
+
+---
+
+### `setNetworkActivityIndicatorVisible()`
+
+```javascript
+static setNetworkActivityIndicatorVisible(visible: boolean)
+```
+
+Control the visibility of the network activity indicator
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | ------- | -------- | ------------------- |
+| visible | boolean | Yes | Show the indicator. |
+
+---
+
+### `setBackgroundColor()`
+
+```javascript
+static setBackgroundColor(color: string, [animated]: boolean)
+```
+
+Set the background color for the status bar
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ------- | -------- | ------------------------- |
+| color | string | Yes | Background color. |
+| animated | boolean | No | Animate the style change. |
+
+---
+
+### `setTranslucent()`
+
+```javascript
+static setTranslucent(translucent: boolean)
+```
+
+Control the translucency of the status bar
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------- | ------- | -------- | ------------------- |
+| translucent | boolean | Yes | Set as translucent. |
+
+## Type Definitions
+
+### StatusBarStyle
+
+Status bar style
+
+| Type |
+| ----- |
+| $Enum |
+
+**Constants:**
+
+| Value | Description |
+| ------------- | -------------------------------------------------------------------- |
+| default | Default status bar style (dark for iOS, light for Android) |
+| light-content | Dark background, white texts and icons |
+| dark-content | Light background, dark texts and icons (requires API>=23 on Android) |
+
+---
+
+### StatusBarAnimation
+
+Status bar animation
+
+| Type |
+| ----- |
+| $Enum |
+
+**Constants:**
+
+| Value | Description |
+| ----- | --------------- |
+| none | No animation |
+| fade | Fade animation |
+| slide | Slide animation |
diff --git a/docs/statusbarios.md b/docs/statusbarios.md
new file mode 100644
index 0000000..14670a1
--- /dev/null
+++ b/docs/statusbarios.md
@@ -0,0 +1,10 @@
+---
+id: statusbarios
+title: StatusBarIOS
+---
+
+Use `StatusBar` for mutating the status bar.
+
+---
+
+# Reference
diff --git a/docs/style.md b/docs/style.md
new file mode 100644
index 0000000..5213916
--- /dev/null
+++ b/docs/style.md
@@ -0,0 +1,48 @@
+---
+id: style
+title: Style
+---
+
+With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named `style`. The style names and [values](colors.md) usually match how CSS works on the web, except names are written using camel casing, e.g `backgroundColor` rather than `background-color`.
+
+The `style` prop can be a plain old JavaScript object. That's the simplest and what we usually use for example code. You can also pass an array of styles - the last style in the array has precedence, so you can use this to inherit styles.
+
+As a component grows in complexity, it is often cleaner to use `StyleSheet.create` to define several styles in one place. Here's an example:
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, StyleSheet, Text, View } from 'react-native';
+
+const styles = StyleSheet.create({
+ bigBlue: {
+ color: 'blue',
+ fontWeight: 'bold',
+ fontSize: 30,
+ },
+ red: {
+ color: 'red',
+ },
+});
+
+export default class LotsOfStyles extends Component {
+ render() {
+ return (
+
+ just red
+ just bigBlue
+ bigBlue, then red
+ red, then bigBlue
+
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => LotsOfStyles);
+```
+
+One common pattern is to make your component accept a `style` prop which in turn is used to style subcomponents. You can use this to make styles "cascade" the way they do in CSS.
+
+There are a lot more ways to customize text style. Check out the [Text component reference](text.md) for a complete list.
+
+Now you can make your text beautiful. The next step in becoming a style master is to [learn how to control component size](height-and-width.md).
diff --git a/docs/stylesheet.md b/docs/stylesheet.md
new file mode 100644
index 0000000..7548605
--- /dev/null
+++ b/docs/stylesheet.md
@@ -0,0 +1,161 @@
+---
+id: stylesheet
+title: StyleSheet
+---
+
+A StyleSheet is an abstraction similar to CSS StyleSheets
+
+Create a new StyleSheet:
+
+```javascript
+const styles = StyleSheet.create({
+ container: {
+ borderRadius: 4,
+ borderWidth: 0.5,
+ borderColor: '#d6d7da',
+ },
+ title: {
+ fontSize: 19,
+ fontWeight: 'bold',
+ },
+ activeTitle: {
+ color: 'red',
+ },
+});
+```
+
+Use a StyleSheet:
+
+```javascript
+
+
+
+```
+
+Code quality:
+
+* By moving styles away from the render function, you're making the code easier to understand.
+* Naming the styles is a good way to add meaning to the low level components in the render function.
+
+### Methods
+
+* [`setStyleAttributePreprocessor`](stylesheet.md#setstyleattributepreprocessor)
+* [`create`](stylesheet.md#create)
+* [`flatten`](stylesheet.md#flatten)
+
+### Properties
+
+* [`hairlineWidth`](stylesheet.md#hairlinewidth)
+* [`absoluteFill`](stylesheet.md#absolutefill)
+
+---
+
+# Reference
+
+## Methods
+
+### `setStyleAttributePreprocessor()`
+
+```javascript
+static setStyleAttributePreprocessor(property, process)
+```
+
+WARNING: EXPERIMENTAL. Breaking changes will probably happen a lot and will not be reliably announced. The whole thing might be deleted, who knows? Use at your own risk.
+
+Sets a function to use to pre-process a style property value. This is used internally to process color and transform values. You should not use this unless you really know what you are doing and have exhausted other options.
+
+---
+
+### `create()`
+
+```javascript
+static create(obj)
+```
+
+Creates a StyleSheet style reference from the given object.
+
+---
+
+### `flatten`
+
+```javascript
+static flatten(style)
+```
+
+Flattens an array of style objects, into one aggregated style object. Alternatively, this method can be used to lookup IDs, returned by `StyleSheet.register`.
+
+> _NOTE_: Exercise caution as abusing this can tax you in terms of optimizations. IDs enable optimizations through the bridge and memory in general. Refering to style objects directly will deprive you of these optimizations.
+
+Example:
+
+```javascript
+var styles = StyleSheet.create({
+ listItem: {
+ flex: 1,
+ fontSize: 16,
+ color: 'white',
+ },
+ selectedListItem: {
+ color: 'green',
+ },
+});
+
+StyleSheet.flatten([styles.listItem, styles.selectedListItem]);
+// returns { flex: 1, fontSize: 16, color: 'green' }
+```
+
+Alternative use:
+
+```javascript
+var styles = StyleSheet.create({
+ listItem: {
+ flex: 1,
+ fontSize: 16,
+ color: 'white',
+ },
+ selectedListItem: {
+ color: 'green',
+ },
+});
+
+StyleSheet.flatten(styles.listItem);
+// returns { flex: 1, fontSize: 16, color: 'white' }
+// Simply styles.listItem would return its ID (number)
+```
+
+This method internally uses `StyleSheetRegistry.getStyleByID(style)` to resolve style objects represented by IDs. Thus, an array of style objects (instances of `StyleSheet.create()`), are individually resolved to, their respective objects, merged as one and then returned. This also explains the alternative use.
+
+## Properties
+
+### `hairlineWidth`
+
+```javascript
+var styles = StyleSheet.create({
+ separator: {
+ borderBottomColor: '#bbb',
+ borderBottomWidth: StyleSheet.hairlineWidth,
+ },
+});
+```
+
+This constant will always be a round number of pixels (so a line defined by it can look crisp) and will try to match the standard width of a thin line on the underlying platform. However, you should not rely on it being a constant size, because on different platforms and screen densities its value may be calculated differently.
+
+A line with hairline width may not be visible if your simulator is downscaled.
+
+---
+
+### `absoluteFill`
+
+A very common pattern is to create overlays with position absolute and zero positioning (`position: 'absolute', left: 0, right: 0, top: 0, bottom: 0`), so `absoluteFill` can be used for convenience and to reduce duplication of these repeated styles. If you want, absoluteFill can be used to create a customized entry in a StyleSheet, e.g.:
+
+```javascript
+const styles = StyleSheet.create({
+ wrapper: {
+ ...StyleSheet.absoluteFill,
+ top: 10,
+ backgroundColor: 'transparent',
+ },
+});
+```
+
+---
diff --git a/docs/switch.md b/docs/switch.md
new file mode 100644
index 0000000..55b7b1d
--- /dev/null
+++ b/docs/switch.md
@@ -0,0 +1,109 @@
+---
+id: switch
+title: Switch
+---
+
+Renders a boolean input.
+
+This is a controlled component that requires an `onValueChange` callback that updates the `value` prop in order for the component to reflect user actions. If the `value` prop is not updated, the component will continue to render the supplied `value` prop instead of the expected result of any user actions.
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`disabled`](switch.md#disabled)
+- [`trackColor`](switch.md#trackcolor)
+- [`ios_backgroundColor`](switch.md#ios-backgroundcolor)
+- [`onValueChange`](switch.md#onvaluechange)
+- [`testID`](switch.md#testid)
+- [`thumbColor`](switch.md#thumbcolor)
+- [`tintColor`](switch.md#tintcolor)
+- [`value`](switch.md#value)
+
+---
+
+# Reference
+
+## Props
+
+### `disabled`
+
+If true the user won't be able to toggle the switch. Default value is false.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `trackColor`
+
+Custom colors for the switch track.
+
+_iOS_: When the switch value is false, the track shrinks into the border. If you want to change the color of the background exposed by the shrunken track, use [`ios_backgroundColor`](switch.md#ios_backgroundColor).
+
+| Type | Required |
+| ------------------------------------------------------------- | -------- |
+| object: {false: [color](colors.md), true: [color](colors.md)} | No |
+
+---
+
+### `ios_backgroundColor`
+
+On iOS, custom color for the background. This background color can be seen either when the switch value is false or when the switch is disabled (and the switch is translucent).
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `onValueChange`
+
+Invoked with the new value when the value changes.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `thumbColor`
+
+Color of the foreground switch grip. If this is set on iOS, the switch grip will lose its drop shadow.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `tintColor`
+
+`tintColor` is deprecated, use `trackColor` instead.
+
+Border color on iOS and background color on Android when the switch is turned off.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `value`
+
+The value of the switch. If true the switch will be turned on. Default value is false.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
diff --git a/docs/systrace.md b/docs/systrace.md
new file mode 100644
index 0000000..ca4db8c
--- /dev/null
+++ b/docs/systrace.md
@@ -0,0 +1,137 @@
+---
+id: systrace
+title: Systrace
+---
+
+### Methods
+
+* [`installReactHook`](systrace.md#installreacthook)
+* [`setEnabled`](systrace.md#setenabled)
+* [`isEnabled`](systrace.md#isenabled)
+* [`beginEvent`](systrace.md#beginevent)
+* [`endEvent`](systrace.md#endevent)
+* [`beginAsyncEvent`](systrace.md#beginasyncevent)
+* [`endAsyncEvent`](systrace.md#endasyncevent)
+* [`counterEvent`](systrace.md#counterevent)
+* [`attachToRelayProfiler`](systrace.md#attachtorelayprofiler)
+* [`swizzleJSON`](systrace.md#swizzlejson)
+* [`measureMethods`](systrace.md#measuremethods)
+* [`measure`](systrace.md#measure)
+
+---
+
+# Reference
+
+## Methods
+
+### `installReactHook()`
+
+```javascript
+static installReactHook(useFiber)
+```
+
+---
+
+### `setEnabled()`
+
+```javascript
+static setEnabled(enabled)
+```
+
+---
+
+### `isEnabled()`
+
+```javascript
+static isEnabled()
+```
+
+---
+
+### `beginEvent()`
+
+```javascript
+static beginEvent(profileName?, args?)
+```
+
+beginEvent/endEvent for starting and then ending a profile within the same call stack frame.
+
+---
+
+### `endEvent()`
+
+```javascript
+static endEvent()
+```
+
+---
+
+### `beginAsyncEvent()`
+
+```javascript
+static beginAsyncEvent(profileName?)
+```
+
+beginAsyncEvent/endAsyncEvent for starting and then ending a profile where the end can either occur on another thread or out of the current stack frame, eg await the returned cookie variable should be used as input into the endAsyncEvent call to end the profile.
+
+---
+
+### `endAsyncEvent()`
+
+```javascript
+static endAsyncEvent(profileName?, cookie?)
+```
+
+---
+
+### `counterEvent()`
+
+```javascript
+static counterEvent(profileName?, value?)
+```
+
+Register the value to the profileName on the systrace timeline.
+
+---
+
+### `attachToRelayProfiler()`
+
+```javascript
+static attachToRelayProfiler(relayProfiler)
+```
+
+Relay profiles use await calls, so likely occur out of current stack frame therefore async variant of profiling is used.
+
+---
+
+### `swizzleJSON()`
+
+```javascript
+static swizzleJSON()
+```
+
+This is not called by default due to performance overhead, but it's useful for finding traces which spend too much time in JSON.
+
+---
+
+### `measureMethods()`
+
+```javascript
+static measureMethods(object, objectName, methodNames)
+```
+
+Measures multiple methods of a class. For example, the following will return the `parse` and `stringify` methods of the JSON class: Systrace.measureMethods(JSON, 'JSON', ['parse', 'stringify']);
+
+@param object @param objectName @param methodNames Map from method names to method display names.
+
+---
+
+### `measure()`
+
+```javascript
+static measure(objName, fnName, func)
+```
+
+Returns a profiled version of the input function. For example, you can: JSON.parse = Systrace.measure('JSON', 'parse', JSON.parse);
+
+@param objName @param fnName @param {function} func @return {function} replacement function
diff --git a/docs/text-style-props.md b/docs/text-style-props.md
new file mode 100644
index 0000000..170981d
--- /dev/null
+++ b/docs/text-style-props.md
@@ -0,0 +1,188 @@
+---
+id: text-style-props
+title: Text Style Props
+---
+
+### Props
+
+* [`textShadowOffset`](text-style-props.md#textshadowoffset)
+* [`color`](text-style-props.md#color)
+* [`fontSize`](text-style-props.md#fontsize)
+* [`fontStyle`](text-style-props.md#fontstyle)
+* [`fontWeight`](text-style-props.md#fontweight)
+* [`lineHeight`](text-style-props.md#lineheight)
+* [`textAlign`](text-style-props.md#textalign)
+* [`textDecorationLine`](text-style-props.md#textdecorationline)
+* [`textShadowColor`](text-style-props.md#textshadowcolor)
+* [`fontFamily`](text-style-props.md#fontfamily)
+* [`textShadowRadius`](text-style-props.md#textshadowradius)
+* [`includeFontPadding`](text-style-props.md#includefontpadding)
+* [`textAlignVertical`](text-style-props.md#textalignvertical)
+* [`fontVariant`](text-style-props.md#fontvariant)
+* [`letterSpacing`](text-style-props.md#letterspacing)
+* [`textDecorationColor`](text-style-props.md#textdecorationcolor)
+* [`textDecorationStyle`](text-style-props.md#textdecorationstyle)
+* [`textTransform`](text-style-props.md#texttransform)
+* [`writingDirection`](text-style-props.md#writingdirection)
+
+---
+
+# Reference
+
+## Props
+
+### `textShadowOffset`
+
+| Type | Required |
+| -------------------------------------- | -------- |
+| object: {width: number,height: number} | No |
+
+---
+
+### `color`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `fontSize`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `fontStyle`
+
+| Type | Required |
+| ------------------------ | -------- |
+| enum('normal', 'italic') | No |
+
+---
+
+### `fontWeight`
+
+Specifies font weight. The values 'normal' and 'bold' are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen.
+
+| Type | Required |
+| ------------------------------------------------------------------------------------- | -------- |
+| enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') | No |
+
+---
+
+### `lineHeight`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `textAlign`
+
+Specifies text alignment. The value 'justify' is only supported on iOS and fallbacks to `left` on Android.
+
+| Type | Required |
+| -------------------------------------------------- | -------- |
+| enum('auto', 'left', 'right', 'center', 'justify') | No |
+
+---
+
+### `textDecorationLine`
+
+| Type | Required |
+| ------------------------------------------------------------------- | -------- |
+| enum('none', 'underline', 'line-through', 'underline line-through') | No |
+
+---
+
+### `textShadowColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `fontFamily`
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `textShadowRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `includeFontPadding`
+
+Set to `false` to remove extra font padding intended to make space for certain ascenders / descenders. With some fonts, this padding can make text look slightly misaligned when centered vertically. For best results also set `textAlignVertical` to `center`. Default is true.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `textAlignVertical`
+
+| Type | Required | Platform |
+| --------------------------------------- | -------- | -------- |
+| enum('auto', 'top', 'bottom', 'center') | No | Android |
+
+---
+
+### `fontVariant`
+
+| Type | Required | Platform |
+| ------------------------------------------------------------------------------------------------ | -------- | -------- |
+| array of enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') | No | iOS |
+
+---
+
+### `letterSpacing`
+
+| Type | Required | Platform |
+| ------ | -------- | ------------------- |
+| number | No | iOS, Android >= 5.0 |
+
+---
+
+### `textDecorationColor`
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | iOS |
+
+---
+
+### `textDecorationStyle`
+
+| Type | Required | Platform |
+| ------------------------------------------- | -------- | -------- |
+| enum('solid', 'double', 'dotted', 'dashed') | No | iOS |
+
+---
+
+### `textTransform`
+
+| Type | Required |
+| ---------------------------------------------------- | -------- |
+| enum('none', 'uppercase', 'lowercase', 'capitalize') | No |
+
+---
+
+### `writingDirection`
+
+| Type | Required | Platform |
+| -------------------------- | -------- | -------- |
+| enum('auto', 'ltr', 'rtl') | No | iOS |
diff --git a/docs/textinput.md b/docs/textinput.md
new file mode 100644
index 0000000..9861071
--- /dev/null
+++ b/docs/textinput.md
@@ -0,0 +1,856 @@
+---
+id: textinput
+title: TextInput
+---
+
+A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, such as auto-correction, auto-capitalization, placeholder text, and different keyboard types, such as a numeric keypad.
+
+The simplest use case is to plop down a `TextInput` and subscribe to the `onChangeText` events to read the user input. There are also other events, such as `onSubmitEditing` and `onFocus` that can be subscribed to. A simple example:
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, TextInput } from 'react-native';
+
+export default class UselessTextInput extends Component {
+ constructor(props) {
+ super(props);
+ this.state = { text: 'Useless Placeholder' };
+ }
+
+ render() {
+ return (
+ this.setState({text})}
+ value={this.state.text}
+ />
+ );
+ }
+}
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => UselessTextInput);
+```
+
+Two methods exposed via the native element are .focus() and .blur() that will focus or blur the TextInput programmatically.
+
+Note that some props are only available with `multiline={true/false}`. Additionally, border styles that apply to only one side of the element (e.g., `borderBottomColor`, `borderLeftWidth`, etc.) will not be applied if `multiline=false`. To achieve the same effect, you can wrap your `TextInput` in a `View`:
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, View, TextInput } from 'react-native';
+
+class UselessTextInput extends Component {
+ render() {
+ return (
+
+ );
+ }
+}
+
+export default class UselessTextInputMultiline extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ text: 'Useless Multiline Placeholder',
+ };
+ }
+
+ // If you type something in the text box that is a color, the background will change to that
+ // color.
+ render() {
+ return (
+
+ this.setState({text})}
+ value={this.state.text}
+ />
+
+ );
+ }
+}
+
+// skip these lines if using Create React Native App
+AppRegistry.registerComponent(
+ 'AwesomeProject',
+ () => UselessTextInputMultiline
+);
+```
+
+`TextInput` has by default a border at the bottom of its view. This border has its padding set by the background image provided by the system, and it cannot be changed. Solutions to avoid this is to either not set height explicitly, case in which the system will take care of displaying the border in the correct position, or to not display the border by setting `underlineColorAndroid` to transparent.
+
+Note that on Android performing text selection in input can change app's activity `windowSoftInputMode` param to `adjustResize`. This may cause issues with components that have position: 'absolute' while keyboard is active. To avoid this behavior either specify `windowSoftInputMode` in AndroidManifest.xml ( https://developer.android.com/guide/topics/manifest/activity-element.html ) or control this param programmatically with native code.
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`allowFontScaling`](textinput.md#allowfontscaling)
+- [`autoCapitalize`](textinput.md#autocapitalize)
+- [`autoComplete`](textinput.md#autocomplete)
+- [`autoCorrect`](textinput.md#autocorrect)
+- [`autoFocus`](textinput.md#autofocus)
+- [`blurOnSubmit`](textinput.md#bluronsubmit)
+- [`caretHidden`](textinput.md#carethidden)
+- [`clearButtonMode`](textinput.md#clearbuttonmode)
+- [`clearTextOnFocus`](textinput.md#cleartextonfocus)
+- [`contextMenuHidden`](textinput.md#contextmenuhidden)
+- [`dataDetectorTypes`](textinput.md#datadetectortypes)
+- [`defaultValue`](textinput.md#defaultvalue)
+- [`disableFullscreenUI`](textinput.md#disablefullscreenui)
+- [`editable`](textinput.md#editable)
+- [`enablesReturnKeyAutomatically`](textinput.md#enablesreturnkeyautomatically)
+- [`importantForAutofill`](textinput.md#importantForAutofill)
+- [`inlineImageLeft`](textinput.md#inlineimageleft)
+- [`inlineImagePadding`](textinput.md#inlineimagepadding)
+- [`keyboardAppearance`](textinput.md#keyboardappearance)
+- [`keyboardType`](textinput.md#keyboardtype)
+- [`maxFontSizeMultiplier`](text.md#maxfontsizemultiplier)
+- [`maxLength`](textinput.md#maxlength)
+- [`multiline`](textinput.md#multiline)
+- [`numberOfLines`](textinput.md#numberoflines)
+- [`onBlur`](textinput.md#onblur)
+- [`onChange`](textinput.md#onchange)
+- [`onChangeText`](textinput.md#onchangetext)
+- [`onContentSizeChange`](textinput.md#oncontentsizechange)
+- [`onEndEditing`](textinput.md#onendediting)
+- [`onFocus`](textinput.md#onfocus)
+- [`onKeyPress`](textinput.md#onkeypress)
+- [`onLayout`](textinput.md#onlayout)
+- [`onScroll`](textinput.md#onscroll)
+- [`onSelectionChange`](textinput.md#onselectionchange)
+- [`onSubmitEditing`](textinput.md#onsubmitediting)
+- [`placeholder`](textinput.md#placeholder)
+- [`placeholderTextColor`](textinput.md#placeholdertextcolor)
+- [`returnKeyLabel`](textinput.md#returnkeylabel)
+- [`returnKeyType`](textinput.md#returnkeytype)
+- [`scrollEnabled`](textinput.md#scrollenabled)
+- [`secureTextEntry`](textinput.md#securetextentry)
+- [`selection`](textinput.md#selection)
+- [`selectionColor`](textinput.md#selectioncolor)
+- [`selectionState`](textinput.md#selectionstate)
+- [`selectTextOnFocus`](textinput.md#selecttextonfocus)
+- [`spellCheck`](textinput.md#spellcheck)
+- [`textContentType`](textinput.md#textcontenttype)
+- [`style`](textinput.md#style)
+- [`textBreakStrategy`](textinput.md#textbreakstrategy)
+- [`underlineColorAndroid`](textinput.md#underlinecolorandroid)
+- [`value`](textinput.md#value)
+
+### Methods
+
+* [`clear`](textinput.md#clear)
+* [`isFocused`](textinput.md#isfocused)
+
+---
+
+# Reference
+
+## Props
+
+### `allowFontScaling`
+
+Specifies whether fonts should scale to respect Text Size accessibility settings. The default is `true`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `autoCapitalize`
+
+Can tell `TextInput` to automatically capitalize certain characters. This property is not supported by some keyboard types such as `name-phone-pad`.
+
+* `characters`: all characters.
+* `words`: first letter of each word.
+* `sentences`: first letter of each sentence (_default_).
+* `none`: don't auto capitalize anything.
+
+| Type | Required |
+| ------------------------------------------------ | -------- |
+| enum('none', 'sentences', 'words', 'characters') | No |
+
+---
+
+### `autoComplete`
+
+Specifies autocomplete hints for the system, so it can provide autofill. On Android, the system will aways attempt to offer autofill by using heuristics to identify the type of content. To disable autocomplete, set `autoComplete` to `off`.
+
+Possible values for `autoComplete` are:
+
+* `off`
+* `username`
+* `password`
+* `email`
+* `name`
+* `tel`
+* `street-address`
+* `postal-code`
+* `cc-number`
+* `cc-csc`
+* `cc-exp`
+* `cc-exp-month`
+* `cc-exp-year`
+
+| Type | Required | Platform |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | -------- |
+| enum('off', 'username', 'password', 'email', 'name', 'tel', 'street-address', 'postal-code', 'cc-number', 'cc-csc', 'cc-exp', 'cc-exp-month', 'cc-exp-year') | No | Android |
+
+---
+
+### `autoCorrect`
+
+If `false`, disables auto-correct. The default value is `true`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `autoFocus`
+
+If `true`, focuses the input on `componentDidMount`. The default value is `false`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `blurOnSubmit`
+
+If `true`, the text field will blur when submitted. The default value is true for single-line fields and false for multiline fields. Note that for multiline fields, setting `blurOnSubmit` to `true` means that pressing return will blur the field and trigger the `onSubmitEditing` event instead of inserting a newline into the field.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `caretHidden`
+
+If `true`, caret is hidden. The default value is `false`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `clearButtonMode`
+
+When the clear button should appear on the right side of the text view. This property is supported only for single-line TextInput component. The default value is `never`.
+
+| Type | Required | Platform |
+| ---------------------------------------------------------- | -------- | -------- |
+| enum('never', 'while-editing', 'unless-editing', 'always') | No | iOS |
+
+---
+
+### `clearTextOnFocus`
+
+If `true`, clears the text field automatically when editing begins.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `contextMenuHidden`
+
+If `true`, context menu is hidden. The default value is `false`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `dataDetectorTypes`
+
+Determines the types of data converted to clickable URLs in the text input. Only valid if `multiline={true}` and `editable={false}`. By default no data types are detected.
+
+You can provide one type or an array of many types.
+
+Possible values for `dataDetectorTypes` are:
+
+* `'phoneNumber'`
+* `'link'`
+* `'address'`
+* `'calendarEvent'`
+* `'none'`
+* `'all'`
+
+| Type | Required | Platform |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
+| enum('phoneNumber', 'link', 'address', 'calendarEvent', 'none', 'all'), ,array of enum('phoneNumber', 'link', 'address', 'calendarEvent', 'none', 'all') | No | iOS |
+
+---
+
+### `defaultValue`
+
+Provides an initial value that will change when the user starts typing. Useful for simple use-cases where you do not want to deal with listening to events and updating the value prop to keep the controlled state in sync.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `disableFullscreenUI`
+
+When `false`, if there is a small amount of space available around a text input (e.g. landscape orientation on a phone), the OS may choose to have the user edit the text inside of a full screen text input mode. When `true`, this feature is disabled and users will always edit the text directly inside of the text input. Defaults to `false`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `editable`
+
+If `false`, text is not editable. The default value is `true`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `enablesReturnKeyAutomatically`
+
+If `true`, the keyboard disables the return key when there is no text and automatically enables it when there is text. The default value is `false`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `importantForAutofill`
+
+Say the system whether the individual fields in your app should be included in a view structure for autofill purposes on Android API Level 26+, possible values are `auto`, `no`, `noExcludeDescendants`, `yes`, `yesExcludeDescendants`. The default value is `auto`.
+
+* `auto`: Let the Android System use its heuristics to determine if the view is important for autofill.
+* `no`: This view isn't important for autofill.
+* `noExcludeDescendants`: This view and its children aren't important for autofill.
+* `yes`: This view is important for autofill.
+* `yesExcludeDescendants`: This view is important for autofill, but its children aren't important for autofill.
+
+| Type | Required | Platform |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
+| enum('auto', 'no', 'noExcludeDescendants', 'yes', 'yesExcludeDescendants') | No | Android |
+
+---
+
+### `inlineImageLeft`
+
+If defined, the provided image resource will be rendered on the left. The image resource must be inside `/android/app/src/main/res/drawable` and referenced like
+
+```
+
+```
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| string | No | Android |
+
+---
+
+### `inlineImagePadding`
+
+Padding between the inline image, if any, and the text input itself.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | Android |
+
+---
+
+### `keyboardAppearance`
+
+Determines the color of the keyboard.
+
+| Type | Required | Platform |
+| -------------------------------- | -------- | -------- |
+| enum('default', 'light', 'dark') | No | iOS |
+
+---
+
+### `keyboardType`
+
+Determines which keyboard to open, e.g.`numeric`.
+
+See screenshots of all the types [here](http://lefkowitz.me/2018/04/30/visual-guide-to-react-native-textinput-keyboardtype-options/).
+
+The following values work across platforms:
+
+* `default`
+* `number-pad`
+* `decimal-pad`
+* `numeric`
+* `email-address`
+* `phone-pad`
+
+_iOS Only_
+
+The following values work on iOS only:
+
+* `ascii-capable`
+* `numbers-and-punctuation`
+* `url`
+* `name-phone-pad`
+* `twitter`
+* `web-search`
+
+_Android Only_
+
+The following values work on Android only:
+
+* `visible-password`
+
+| Type | Required |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
+| enum('default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search', 'visible-password') | No |
+
+---
+
+### `maxFontSizeMultiplier`
+
+Specifies largest possible scale a font can reach when `allowFontScaling` is enabled. Possible values:
+
+* `null/undefined` (default): inherit from the parent node or the global default (0)
+* `0`: no max, ignore parent/global default
+* `>= 1`: sets the `maxFontSizeMultiplier` of this node to this value
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `maxLength`
+
+Limits the maximum number of characters that can be entered. Use this instead of implementing the logic in JS to avoid flicker.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `multiline`
+
+If `true`, the text input can be multiple lines. The default value is `false`. It is important to note that this aligns the text to the top on iOS, and centers it on Android. Use with `textAlignVertical` set to `top` for the same behavior in both platforms.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `numberOfLines`
+
+Sets the number of lines for a `TextInput`. Use it with multiline set to `true` to be able to fill the lines.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | Android |
+
+---
+
+### `onBlur`
+
+Callback that is called when the text input is blurred.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onChange`
+
+Callback that is called when the text input's text changes. This will be called with `{ nativeEvent: { eventCount, target, text} }`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onChangeText`
+
+Callback that is called when the text input's text changes. Changed text is passed as a single string argument to the callback handler.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onContentSizeChange`
+
+Callback that is called when the text input's content size changes. This will be called with `{ nativeEvent: { contentSize: { width, height } } }`.
+
+Only called for multiline text inputs.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onEndEditing`
+
+Callback that is called when text input ends.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onFocus`
+
+Callback that is called when the text input is focused. This is called with `{ nativeEvent: { target } }`.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onKeyPress`
+
+Callback that is called when a key is pressed. This will be called with `{ nativeEvent: { key: keyValue } }` where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and the typed-in character otherwise including `' '` for space. Fires before `onChange` callbacks. Note: on Android only the inputs from soft keyboard are handled, not the hardware keyboard inputs.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLayout`
+
+Invoked on mount and layout changes with `{ nativeEvent: {layout: {x, y, width, height}, target } }`.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onScroll`
+
+Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`. May also contain other properties from ScrollEvent but on Android contentSize is not provided for performance reasons.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onSelectionChange`
+
+Callback that is called when the text input selection is changed. This will be called with `{ nativeEvent: { selection: { start, end } } }`.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onSubmitEditing`
+
+Callback that is called when the text input's submit button is pressed with the argument `{nativeEvent: {text, eventCount, target}}`. Invalid if `multiline={true}` is specified.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `placeholder`
+
+The string that will be rendered before text input has been entered.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `placeholderTextColor`
+
+The text color of the placeholder string.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `returnKeyLabel`
+
+Sets the return key to the label. Use it instead of `returnKeyType`.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| string | No | Android |
+
+---
+
+### `returnKeyType`
+
+Determines how the return key should look. On Android you can also use `returnKeyLabel`.
+
+_Cross platform_
+
+The following values work across platforms:
+
+* `done`
+* `go`
+* `next`
+* `search`
+* `send`
+
+_Android Only_
+
+The following values work on Android only:
+
+* `none`
+* `previous`
+
+_iOS Only_
+
+The following values work on iOS only:
+
+* `default`
+* `emergency-call`
+* `google`
+* `join`
+* `route`
+* `yahoo`
+
+| Type | Required |
+| --------------------------------------------------------------------------------------------------------------------------------- | -------- |
+| enum('done', 'go', 'next', 'search', 'send', 'none', 'previous', 'default', 'emergency-call', 'google', 'join', 'route', 'yahoo') | No |
+
+---
+
+### `scrollEnabled`
+
+If `false`, scrolling of the text view will be disabled. The default value is `true`. Only works with `multiline={true}`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `secureTextEntry`
+
+If `true`, the text input obscures the text entered so that sensitive text like passwords stay secure. The default value is `false`. Does not work with `multiline={true}`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `selection`
+
+The start and end of the text input's selection. Set start and end to the same value to position the cursor.
+
+| Type | Required |
+| ----------------------------------- | -------- |
+| object: {start: number,end: number} | No |
+
+---
+
+### `selectionColor`
+
+The highlight and cursor color of the text input.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `selectionState`
+
+An instance of `DocumentSelectionState`, this is some state that is responsible for maintaining selection information for a document.
+
+Some functionality that can be performed with this instance is:
+
+* `blur()`
+* `focus()`
+* `update()`
+
+> You can reference `DocumentSelectionState` in [`vendor/document/selection/DocumentSelectionState.js`](https://github.com/facebook/react-native/blob/master/Libraries/vendor/document/selection/DocumentSelectionState.js)
+
+| Type | Required | Platform |
+| ---------------------- | -------- | -------- |
+| DocumentSelectionState | No | iOS |
+
+---
+
+### `selectTextOnFocus`
+
+If `true`, all text will automatically be selected on focus.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `spellCheck`
+
+If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `textContentType`
+
+Give the keyboard and the system information about the expected semantic meaning for the content that users enter.
+
+For iOS 11+ you can set `textContentType` to `username` or `password` to enable autofill of login details from the device keychain.
+
+For iOS 12+ `newPassword` can be used to indicate a new password input the user may want to save in the keychain, and `oneTimeCode` can be used to indicate that a field can be autofilled by a code arriving in an SMS.
+
+To disable autofill, set `textContentType` to `none`.
+
+Possible values for `textContentType` are:
+
+* `none`
+* `URL`
+* `addressCity`
+* `addressCityAndState`
+* `addressState`
+* `countryName`
+* `creditCardNumber`
+* `emailAddress`
+* `familyName`
+* `fullStreetAddress`
+* `givenName`
+* `jobTitle`
+* `location`
+* `middleName`
+* `name`
+* `namePrefix`
+* `nameSuffix`
+* `nickname`
+* `organizationName`
+* `postalCode`
+* `streetAddressLine1`
+* `streetAddressLine2`
+* `sublocality`
+* `telephoneNumber`
+* `username`
+* `password`
+* `newPassword`
+* `oneTimeCode`
+
+| Type | Required | Platform |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
+| enum('none', 'URL', 'addressCity', 'addressCityAndState', 'addressState', 'countryName', 'creditCardNumber', 'emailAddress', 'familyName', 'fullStreetAddress', 'givenName', 'jobTitle', 'location', 'middleName', 'name', 'namePrefix', 'nameSuffix', 'nickname', 'organizationName', 'postalCode', 'streetAddressLine1', 'streetAddressLine2', 'sublocality', 'telephoneNumber', 'username', 'password') | No | iOS |
+
+---
+
+### `style`
+
+Note that not all Text styles are supported, an incomplete list of what is not supported includes:
+
+* `borderLeftWidth`
+* `borderTopWidth`
+* `borderRightWidth`
+* `borderBottomWidth`
+* `borderTopLeftRadius`
+* `borderTopRightRadius`
+* `borderBottomRightRadius`
+* `borderBottomLeftRadius`
+
+see [Issue#7070](https://github.com/facebook/react-native/issues/7070) for more detail.
+
+[Styles](style.md)
+
+| Type | Required |
+| --------------------- | -------- |
+| [Text](text.md#style) | No |
+
+---
+
+### `textBreakStrategy`
+
+Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced` The default value is `simple`.
+
+| Type | Required | Platform |
+| ----------------------------------------- | -------- | -------- |
+| enum('simple', 'highQuality', 'balanced') | No | Android |
+
+---
+
+### `underlineColorAndroid`
+
+The color of the `TextInput` underline.
+
+| Type | Required | Platform |
+| ------------------ | -------- | -------- |
+| [color](colors.md) | No | Android |
+
+---
+
+### `value`
+
+The value to show for the text input. `TextInput` is a controlled component, which means the native value will be forced to match this value prop if provided. For most uses, this works great, but in some cases this may cause flickering - one common cause is preventing edits by keeping value the same. In addition to simply setting the same value, either set `editable={false}`, or set/update `maxLength` to prevent unwanted edits without flicker.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+## Methods
+
+### `clear()`
+
+```javascript
+clear();
+```
+
+Removes all text from the `TextInput`.
+
+---
+
+### `isFocused()`
+
+```javascript
+isFocused();
+```
+
+Returns `true` if the input is currently focused; `false` otherwise.
+
+# Known issues
+
+* [react-native#19096](https://github.com/facebook/react-native/issues/19096): Doesn't support Android's `onKeyPreIme`.
+* [react-native#19366](https://github.com/facebook/react-native/issues/19366): Calling .focus() after closing Android's keyboard via back button doesn't bring keyboard up again.
diff --git a/docs/timepickerandroid.md b/docs/timepickerandroid.md
new file mode 100644
index 0000000..31f9ae2
--- /dev/null
+++ b/docs/timepickerandroid.md
@@ -0,0 +1,75 @@
+---
+id: timepickerandroid
+title: TimePickerAndroid
+---
+
+Opens the standard Android time picker dialog.
+
+### Example
+
+```javascript
+try {
+ const {action, hour, minute} = await TimePickerAndroid.open({
+ hour: 14,
+ minute: 0,
+ is24Hour: false, // Will display '2 PM'
+ });
+ if (action !== TimePickerAndroid.dismissedAction) {
+ // Selected hour (0-23), minute (0-59)
+ }
+} catch ({code, message}) {
+ console.warn('Cannot open time picker', message);
+}
+```
+
+### Methods
+
+* [`open`](timepickerandroid.md#open)
+* [`timeSetAction`](timepickerandroid.md#timesetaction)
+* [`dismissedAction`](timepickerandroid.md#dismissedaction)
+
+---
+
+# Reference
+
+## Methods
+
+### `open()`
+
+```javascript
+static open(options)
+```
+
+Opens the standard Android time picker dialog.
+
+The available keys for the `options` object are:
+
+* `hour` (0-23) - the hour to show, defaults to the current time
+* `minute` (0-59) - the minute to show, defaults to the current time
+* `is24Hour` (boolean) - If `true`, the picker uses the 24-hour format. If `false`, the picker shows an AM/PM chooser. If undefined, the default for the current locale is used.
+* `mode` (`enum('clock', 'spinner', 'default')`) - set the time picker mode
+ * 'clock': Show a time picker in clock mode.
+ * 'spinner': Show a time picker in spinner mode.
+ * 'default': Show a default time picker based on Android versions.
+
+Returns a Promise which will be invoked an object containing `action`, `hour` (0-23), `minute` (0-59) if the user picked a time. If the user dismissed the dialog, the Promise will still be resolved with action being `TimePickerAndroid.dismissedAction` and all the other keys being undefined. **Always** check whether the `action` before reading the values.
+
+---
+
+### `timeSetAction()`
+
+```javascript
+static timeSetAction()
+```
+
+A time has been selected.
+
+---
+
+### `dismissedAction()`
+
+```javascript
+static dismissedAction()
+```
+
+The dialog has been dismissed.
diff --git a/docs/timers.md b/docs/timers.md
new file mode 100644
index 0000000..d33c488
--- /dev/null
+++ b/docs/timers.md
@@ -0,0 +1,72 @@
+---
+id: timers
+title: Timers
+---
+
+Timers are an important part of an application and React Native implements the [browser timers](https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers).
+
+## Timers
+
+* setTimeout, clearTimeout
+* setInterval, clearInterval
+* setImmediate, clearImmediate
+* requestAnimationFrame, cancelAnimationFrame
+
+`requestAnimationFrame(fn)` is not the same as `setTimeout(fn, 0)` - the former will fire after all the frame has flushed, whereas the latter will fire as quickly as possible (over 1000x per second on a iPhone 5S).
+
+`setImmediate` is executed at the end of the current JavaScript execution block, right before sending the batched response back to native. Note that if you call `setImmediate` within a `setImmediate` callback, it will be executed right away, it won't yield back to native in between.
+
+The `Promise` implementation uses `setImmediate` as its asynchronicity primitive.
+
+## InteractionManager
+
+One reason why well-built native apps feel so smooth is by avoiding expensive operations during interactions and animations. In React Native, we currently have a limitation that there is only a single JS execution thread, but you can use `InteractionManager` to make sure long-running work is scheduled to start after any interactions/animations have completed.
+
+Applications can schedule tasks to run after interactions with the following:
+
+```javascript
+InteractionManager.runAfterInteractions(() => {
+ // ...long-running synchronous task...
+});
+```
+
+Compare this to other scheduling alternatives:
+
+* requestAnimationFrame(): for code that animates a view over time.
+* setImmediate/setTimeout/setInterval(): run code later, note this may delay animations.
+* runAfterInteractions(): run code later, without delaying active animations.
+
+The touch handling system considers one or more active touches to be an 'interaction' and will delay `runAfterInteractions()` callbacks until all touches have ended or been cancelled.
+
+InteractionManager also allows applications to register animations by creating an interaction 'handle' on animation start, and clearing it upon completion:
+
+```javascript
+var handle = InteractionManager.createInteractionHandle();
+// run animation... (`runAfterInteractions` tasks are queued)
+// later, on animation completion:
+InteractionManager.clearInteractionHandle(handle);
+// queued tasks run if all handles were cleared
+```
+
+## TimerMixin
+
+We found out that the primary cause of fatals in apps created with React Native was due to timers firing after a component was unmounted. To solve this recurring issue, we introduced `TimerMixin`. If you include `TimerMixin`, then you can replace your calls to `setTimeout(fn, 500)` with `this.setTimeout(fn, 500)` (just prepend `this.`) and everything will be properly cleaned up for you when the component unmounts.
+
+This library does not ship with React Native - in order to use it on your project, you will need to install it with `npm i react-timer-mixin --save` from your project directory.
+
+```javascript
+import TimerMixin from 'react-timer-mixin';
+
+var Component = createReactClass({
+ mixins: [TimerMixin],
+ componentDidMount: function() {
+ this.setTimeout(() => {
+ console.log('I do not leak!');
+ }, 500);
+ },
+});
+```
+
+This will eliminate a lot of hard work tracking down bugs, such as crashes caused by timeouts firing after a component has been unmounted.
+
+Keep in mind that if you use ES6 classes for your React components [there is no built-in API for mixins](https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#mixins). To use `TimerMixin` with ES6 classes, we recommend [react-mixin](https://github.com/brigand/react-mixin).
diff --git a/docs/toastandroid.md b/docs/toastandroid.md
new file mode 100644
index 0000000..b85a6a8
--- /dev/null
+++ b/docs/toastandroid.md
@@ -0,0 +1,174 @@
+---
+id: toastandroid
+title: ToastAndroid
+---
+
+This exposes the native ToastAndroid module as a JS module. This has a function 'show' which takes the following parameters:
+
+1. String message: A string with the text to toast
+2. int duration: The duration of the toast. May be ToastAndroid.SHORT or ToastAndroid.LONG
+
+There is also a function `showWithGravity` to specify the layout gravity. May be ToastAndroid.TOP, ToastAndroid.BOTTOM, ToastAndroid.CENTER.
+
+The 'showWithGravityAndOffset' function adds on the ability to specify offset These offset values will translate to pixels.
+
+Basic usage:
+
+```javascript
+import {ToastAndroid} from 'react-native';
+
+ToastAndroid.show('A pikachu appeared nearby !', ToastAndroid.SHORT);
+ToastAndroid.showWithGravity(
+ 'All Your Base Are Belong To Us',
+ ToastAndroid.SHORT,
+ ToastAndroid.CENTER,
+);
+ToastAndroid.showWithGravityAndOffset(
+ 'A wild toast appeared!',
+ ToastAndroid.LONG,
+ ToastAndroid.BOTTOM,
+ 25,
+ 50,
+);
+```
+
+### Advanced usage:
+
+The ToastAndroid API is imperative and this might present itself as an issue, but there is actually a way(hack) to expose a declarative component from it. See an example below:
+
+```javascript
+import React, {Component} from 'react';
+import {View, Button, ToastAndroid} from 'react-native';
+
+// a component that calls the imperative ToastAndroid API
+const Toast = (props) => {
+ if (props.visible) {
+ ToastAndroid.showWithGravityAndOffset(
+ props.message,
+ ToastAndroid.LONG,
+ ToastAndroid.BOTTOM,
+ 25,
+ 50,
+ );
+ return null;
+ }
+ return null;
+};
+
+class App extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ visible: false,
+ };
+ }
+
+ handleButtonPress = () => {
+ this.setState(
+ {
+ visible: true,
+ },
+ () => {
+ this.hideToast();
+ },
+ );
+ };
+
+ hideToast = () => {
+ this.setState({
+ visible: false,
+ });
+ };
+
+ render() {
+ return (
+
+
+
+
+ );
+ }
+}
+```
+
+### Methods
+
+* [`show`](toastandroid.md#show)
+* [`showWithGravity`](toastandroid.md#showwithgravity)
+* [`showWithGravityAndOffset`](toastandroid.md#showwithgravityandoffset)
+
+### Properties
+
+* [`SHORT`](toastandroid.md#short)
+* [`LONG`](toastandroid.md#long)
+* [`TOP`](toastandroid.md#top)
+* [`BOTTOM`](toastandroid.md#bottom)
+* [`CENTER`](toastandroid.md#center)
+
+---
+
+# Reference
+
+## Methods
+
+### `show()`
+
+```javascript
+static show(message, duration)
+```
+
+---
+
+### `showWithGravity()`
+
+```javascript
+static showWithGravity(message, duration, gravity)
+```
+
+---
+
+### `showWithGravityAndOffset()`
+
+```javascript
+static showWithGravityAndOffset(message, duration, gravity, xOffset, yOffset)
+```
+
+## Properties
+
+### `SHORT`
+
+```javascript
+ToastAndroid.SHORT;
+```
+
+---
+
+### `LONG`
+
+```javascript
+ToastAndroid.LONG;
+```
+
+---
+
+### `TOP`
+
+```javascript
+ToastAndroid.TOP;
+```
+
+---
+
+### `BOTTOM`
+
+```javascript
+ToastAndroid.BOTTOM;
+```
+
+---
+
+### `CENTER`
+
+```javascript
+ToastAndroid.CENTER;
+```
diff --git a/docs/toolbarandroid.md b/docs/toolbarandroid.md
new file mode 100644
index 0000000..8998284
--- /dev/null
+++ b/docs/toolbarandroid.md
@@ -0,0 +1,209 @@
+---
+id: toolbarandroid
+title: ToolbarAndroid
+---
+
+React component that wraps the Android-only [`Toolbar` widget][0]. A Toolbar can display a logo, navigation icon (e.g. hamburger menu), a title & subtitle and a list of actions. The title and subtitle are expanded so the logo and navigation icons are displayed on the left, title and subtitle in the middle and the actions on the right.
+
+If the toolbar has an only child, it will be displayed between the title and actions.
+
+Although the Toolbar supports remote images for the logo, navigation and action icons, this should only be used in DEV mode where `require('./some_icon.png')` translates into a packager URL. In release mode you should always use a drawable resource for these icons. Using `require('./some_icon.png')` will do this automatically for you, so as long as you don't explicitly use e.g. `{uri: 'http://...'}`, you will be good.
+
+Example:
+
+```javascript
+render: function() {
+ return (
+
+ )
+},
+onActionSelected: function(position) {
+ if (position === 0) { // index of 'Settings'
+ showSettings();
+ }
+}
+```
+
+[0]: https://developer.android.com/reference/android/support/v7/widget/Toolbar.html
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`overflowIcon`](toolbarandroid.md#overflowicon)
+- [`actions`](toolbarandroid.md#actions)
+- [`contentInsetStart`](toolbarandroid.md#contentinsetstart)
+- [`logo`](toolbarandroid.md#logo)
+- [`navIcon`](toolbarandroid.md#navicon)
+- [`onActionSelected`](toolbarandroid.md#onactionselected)
+- [`onIconClicked`](toolbarandroid.md#oniconclicked)
+- [`contentInsetEnd`](toolbarandroid.md#contentinsetend)
+- [`rtl`](toolbarandroid.md#rtl)
+- [`subtitle`](toolbarandroid.md#subtitle)
+- [`subtitleColor`](toolbarandroid.md#subtitlecolor)
+- [`testID`](toolbarandroid.md#testid)
+- [`title`](toolbarandroid.md#title)
+- [`titleColor`](toolbarandroid.md#titlecolor)
+
+---
+
+# Reference
+
+## Props
+
+### `overflowIcon`
+
+Sets the overflow icon.
+
+| Type | Required |
+| ------------------- | -------- |
+| optionalImageSource | No |
+
+---
+
+### `actions`
+
+Sets possible actions on the toolbar as part of the action menu. These are displayed as icons or text on the right side of the widget. If they don't fit they are placed in an 'overflow' menu.
+
+This property takes an array of objects, where each object has the following keys:
+
+* `title`: **required**, the title of this action
+* `icon`: the icon for this action, e.g. `require('./some_icon.png')`
+* `show`: when to show this action as an icon or hide it in the overflow menu: `always`, `ifRoom` or `never`
+* `showWithText`: boolean, whether to show text alongside the icon or not
+
+| Type | Required |
+| --------------------------------------------------------------------------------------------------------------------- | -------- |
+| array of object: {title: string,icon: optionalImageSource,show: enum('always', 'ifRoom', 'never'),showWithText: bool} | No |
+
+---
+
+### `contentInsetStart`
+
+Sets the content inset for the toolbar starting edge.
+
+The content inset affects the valid area for Toolbar content other than the navigation button and menu. Insets define the minimum margin for these components and can be used to effectively align Toolbar content along well-known gridlines.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `logo`
+
+Sets the toolbar logo.
+
+| Type | Required |
+| ------------------- | -------- |
+| optionalImageSource | No |
+
+---
+
+### `navIcon`
+
+Sets the navigation icon.
+
+| Type | Required |
+| ------------------- | -------- |
+| optionalImageSource | No |
+
+---
+
+### `onActionSelected`
+
+Callback that is called when an action is selected. The only argument that is passed to the callback is the position of the action in the actions array.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onIconClicked`
+
+Callback called when the icon is selected.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `contentInsetEnd`
+
+Sets the content inset for the toolbar ending edge.
+
+The content inset affects the valid area for Toolbar content other than the navigation button and menu. Insets define the minimum margin for these components and can be used to effectively align Toolbar content along well-known gridlines.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `rtl`
+
+Used to set the toolbar direction to RTL. In addition to this property you need to add
+
+android:supportsRtl="true"
+
+to your application AndroidManifest.xml and then call `setLayoutDirection(LayoutDirection.RTL)` in your MainActivity `onCreate` method.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `subtitle`
+
+Sets the toolbar subtitle.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `subtitleColor`
+
+Sets the toolbar subtitle color.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `title`
+
+Sets the toolbar title.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `titleColor`
+
+Sets the toolbar title color.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
diff --git a/docs/touchablehighlight.md b/docs/touchablehighlight.md
new file mode 100644
index 0000000..014edbf
--- /dev/null
+++ b/docs/touchablehighlight.md
@@ -0,0 +1,177 @@
+---
+id: touchablehighlight
+title: TouchableHighlight
+---
+
+A wrapper for making views respond properly to touches. On press down, the opacity of the wrapped view is decreased, which allows the underlay color to show through, darkening or tinting the view.
+
+The underlay comes from wrapping the child in a new View, which can affect layout, and sometimes cause unwanted visual artifacts if not used correctly, for example if the backgroundColor of the wrapped view isn't explicitly set to an opaque color.
+
+TouchableHighlight must have one child (not zero or more than one). If you wish to have several child components, wrap them in a View.
+
+Example:
+
+```javascript
+renderButton: function() {
+ return (
+
+
+
+ );
+},
+```
+
+### Example
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react'
+import {
+ AppRegistry,
+ StyleSheet,
+ TouchableHighlight,
+ Text,
+ View,
+} from 'react-native'
+
+class App extends Component {
+ constructor(props) {
+ super(props)
+ this.state = { count: 0 }
+ }
+
+ onPress = () => {
+ this.setState({
+ count: this.state.count+1
+ })
+ }
+
+ render() {
+ return (
+
+
+ Touch Here
+
+
+
+ { this.state.count !== 0 ? this.state.count: null}
+
+
+
+ )
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ paddingHorizontal: 10
+ },
+ button: {
+ alignItems: 'center',
+ backgroundColor: '#DDDDDD',
+ padding: 10
+ },
+ countContainer: {
+ alignItems: 'center',
+ padding: 10
+ },
+ countText: {
+ color: '#FF00FF'
+ }
+})
+
+AppRegistry.registerComponent('App', () => App)
+```
+
+### Props
+
+* [TouchableWithoutFeedback props...](touchablewithoutfeedback.md#props)
+
+- [`activeOpacity`](touchablehighlight.md#activeopacity)
+- [`onHideUnderlay`](touchablehighlight.md#onhideunderlay)
+- [`onShowUnderlay`](touchablehighlight.md#onshowunderlay)
+- [`style`](touchablehighlight.md#style)
+- [`underlayColor`](touchablehighlight.md#underlaycolor)
+- [`hasTVPreferredFocus`](touchablehighlight.md#hastvpreferredfocus)
+- [`tvParallaxProperties`](touchablehighlight.md#tvparallaxproperties)
+
+---
+
+# Reference
+
+## Props
+
+### `activeOpacity`
+
+Determines what the opacity of the wrapped view should be when touch is active. The value should be between 0 and 1. Defaults to 0.85. Requires `underlayColor` to be set.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `onHideUnderlay`
+
+Called immediately after the underlay is hidden.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onShowUnderlay`
+
+Called immediately after the underlay is shown.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `style`
+
+| Type | Required |
+| ---------- | -------- |
+| View.style | No |
+
+---
+
+### `underlayColor`
+
+The color of the underlay that will show through when the touch is active.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `hasTVPreferredFocus`
+
+_(Apple TV only)_ TV preferred focus (see documentation for the View component).
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `tvParallaxProperties`
+
+_(Apple TV only)_ Object with properties to control Apple TV parallax effects.
+
+enabled: If true, parallax effects are enabled. Defaults to true. shiftDistanceX: Defaults to 2.0. shiftDistanceY: Defaults to 2.0. tiltAngle: Defaults to 0.05. magnification: Defaults to 1.0. pressMagnification: Defaults to 1.0. pressDuration: Defaults to 0.3. pressDelay: Defaults to 0.0.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| object | No | iOS |
diff --git a/docs/touchablenativefeedback.md b/docs/touchablenativefeedback.md
new file mode 100644
index 0000000..60f5efc
--- /dev/null
+++ b/docs/touchablenativefeedback.md
@@ -0,0 +1,111 @@
+---
+id: touchablenativefeedback
+title: TouchableNativeFeedback
+---
+
+A wrapper for making views respond properly to touches (Android only). On Android this component uses native state drawable to display touch feedback.
+
+At the moment it only supports having a single View instance as a child node, as it's implemented by replacing that View with another instance of RCTView node with some additional properties set.
+
+Background drawable of native feedback touchable can be customized with `background` property.
+
+Example:
+
+```javascript
+renderButton: function() {
+ return (
+
+
+ Button
+
+
+ );
+},
+```
+
+### Props
+
+* [TouchableWithoutFeedback props...](touchablewithoutfeedback.md#props)
+
+- [`background`](touchablenativefeedback.md#background)
+- [`useForeground`](touchablenativefeedback.md#useforeground)
+
+### Methods
+
+* [`SelectableBackground`](touchablenativefeedback.md#selectablebackground)
+* [`SelectableBackgroundBorderless`](touchablenativefeedback.md#selectablebackgroundborderless)
+* [`Ripple`](touchablenativefeedback.md#ripple)
+* [`canUseNativeForeground`](touchablenativefeedback.md#canusenativeforeground)
+
+---
+
+# Reference
+
+## Props
+
+### `background`
+
+Determines the type of background drawable that's going to be used to display feedback. It takes an object with `type` property and extra data depending on the `type`. It's recommended to use one of the static methods to generate that dictionary.
+
+| Type | Required |
+| ------------------ | -------- |
+| backgroundPropType | No |
+
+---
+
+### `useForeground`
+
+Set to true to add the ripple effect to the foreground of the view, instead of the background. This is useful if one of your child views has a background of its own, or you're e.g. displaying images, and you don't want the ripple to be covered by them.
+
+Check TouchableNativeFeedback.canUseNativeForeground() first, as this is only available on Android 6.0 and above. If you try to use this on older versions you will get a warning and fallback to background.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+## Methods
+
+### `SelectableBackground()`
+
+```javascript
+static SelectableBackground()
+```
+
+Creates an object that represents android theme's default background for selectable elements (?android:attr/selectableItemBackground).
+
+---
+
+### `SelectableBackgroundBorderless()`
+
+```javascript
+static SelectableBackgroundBorderless()
+```
+
+Creates an object that represent android theme's default background for borderless selectable elements (?android:attr/selectableItemBackgroundBorderless). Available on android API level 21+.
+
+---
+
+### `Ripple()`
+
+```javascript
+static Ripple(color: string, borderless: boolean)
+```
+
+Creates an object that represents ripple drawable with specified color (as a string). If property `borderless` evaluates to true the ripple will render outside of the view bounds (see native actionbar buttons as an example of that behavior). This background type is available on Android API level 21+.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---------- | ------- | -------- | -------------------------------------------- |
+| color | string | Yes | The ripple color |
+| borderless | boolean | Yes | If the ripple can render outside it's bounds |
+
+---
+
+### `canUseNativeForeground()`
+
+```javascript
+static canUseNativeForeground()
+```
diff --git a/docs/touchableopacity.md b/docs/touchableopacity.md
new file mode 100644
index 0000000..c0caae5
--- /dev/null
+++ b/docs/touchableopacity.md
@@ -0,0 +1,156 @@
+---
+id: touchableopacity
+title: TouchableOpacity
+---
+
+A wrapper for making views respond properly to touches. On press down, the opacity of the wrapped view is decreased, dimming it.
+
+Opacity is controlled by wrapping the children in an Animated.View, which is added to the view hierarchy. Be aware that this can affect layout.
+
+Example:
+
+```javascript
+renderButton: function() {
+ return (
+
+
+
+ );
+},
+```
+
+### Example
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react'
+import {
+ AppRegistry,
+ StyleSheet,
+ TouchableOpacity,
+ Text,
+ View,
+} from 'react-native'
+
+class App extends Component {
+ constructor(props) {
+ super(props)
+ this.state = { count: 0 }
+ }
+
+ onPress = () => {
+ this.setState({
+ count: this.state.count+1
+ })
+ }
+
+ render() {
+ return (
+
+
+ Touch Here
+
+
+
+ { this.state.count !== 0 ? this.state.count: null}
+
+
+
+ )
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ paddingHorizontal: 10
+ },
+ button: {
+ alignItems: 'center',
+ backgroundColor: '#DDDDDD',
+ padding: 10
+ },
+ countContainer: {
+ alignItems: 'center',
+ padding: 10
+ },
+ countText: {
+ color: '#FF00FF'
+ }
+})
+
+AppRegistry.registerComponent('App', () => App)
+```
+
+### Props
+
+* [TouchableWithoutFeedback props...](touchablewithoutfeedback.md#props)
+
+- [`style`](touchableopacity.md#style)
+- [`activeOpacity`](touchableopacity.md#activeopacity)
+- [`tvParallaxProperties`](touchableopacity.md#tvparallaxproperties)
+- [`hasTVPreferredFocus`](touchableopacity.md#hastvpreferredfocus)
+
+### Methods
+
+* [`setOpacityTo`](touchableopacity.md#setopacityto)
+
+---
+
+# Reference
+
+## Props
+
+### `style`
+
+| Type | Required |
+| ---------- | -------- |
+| View.style | No |
+
+---
+
+### `activeOpacity`
+
+Determines what the opacity of the wrapped view should be when touch is active. Defaults to 0.2.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `tvParallaxProperties`
+
+_(Apple TV only)_ Object with properties to control Apple TV parallax effects.
+
+enabled: If true, parallax effects are enabled. Defaults to true. shiftDistanceX: Defaults to 2.0. shiftDistanceY: Defaults to 2.0. tiltAngle: Defaults to 0.05. magnification: Defaults to 1.0. pressMagnification: Defaults to 1.0. pressDuration: Defaults to 0.3. pressDelay: Defaults to 0.0.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| object | No | iOS |
+
+---
+
+### `hasTVPreferredFocus`
+
+_(Apple TV only)_ TV preferred focus (see documentation for the View component).
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+## Methods
+
+### `setOpacityTo()`
+
+```javascript
+setOpacityTo((value: number), (duration: number));
+```
+
+Animate the touchable to a new opacity.
diff --git a/docs/touchablewithoutfeedback.md b/docs/touchablewithoutfeedback.md
new file mode 100644
index 0000000..812c716
--- /dev/null
+++ b/docs/touchablewithoutfeedback.md
@@ -0,0 +1,250 @@
+---
+id: touchablewithoutfeedback
+title: TouchableWithoutFeedback
+---
+
+Do not use unless you have a very good reason. All elements that respond to press should have a visual feedback when touched.
+
+TouchableWithoutFeedback supports only one child. If you wish to have several child components, wrap them in a View.
+
+### Props
+
+* [`accessibilityComponentType`](touchablewithoutfeedback.md#accessibilitycomponenttype)
+* [`accessibilityHint`](touchablewithoutfeedback.md#accessibilityhint)
+* [`accessibilityLabel`](touchablewithoutfeedback.md#accessibilitylabel)
+* [`accessibilityRole`](view.md#accessibilityrole)
+* [`accessibilityStates`](view.md#accessibilitystates)
+* [`accessibilityTraits`](touchablewithoutfeedback.md#accessibilitytraits)
+* [`accessible`](touchablewithoutfeedback.md#accessible)
+* [`delayLongPress`](touchablewithoutfeedback.md#delaylongpress)
+* [`delayPressIn`](touchablewithoutfeedback.md#delaypressin)
+* [`delayPressOut`](touchablewithoutfeedback.md#delaypressout)
+* [`disabled`](touchablewithoutfeedback.md#disabled)
+* [`hitSlop`](touchablewithoutfeedback.md#hitslop)
+* [`onBlur`](touchablewithoutfeedback.md#onblur)
+* [`onFocus`](touchablewithoutfeedback.md#onfocus)
+* [`onLayout`](touchablewithoutfeedback.md#onlayout)
+* [`onLongPress`](touchablewithoutfeedback.md#onlongpress)
+* [`onPress`](touchablewithoutfeedback.md#onpress)
+* [`onPressIn`](touchablewithoutfeedback.md#onpressin)
+* [`onPressOut`](touchablewithoutfeedback.md#onpressout)
+* [`pressRetentionOffset`](touchablewithoutfeedback.md#pressretentionoffset)
+* [`testID`](touchablewithoutfeedback.md#testid)
+
+### Type Definitions
+
+* [`Event`](touchablewithoutfeedback.md#event)
+
+---
+
+# Reference
+
+## Props
+
+### `accessibilityComponentType`
+
+_> Note: `accessibilityComponentType`will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead._
+
+| Type | Required |
+| --------------------------- | -------- |
+| AccessibilityComponentTypes | No |
+
+---
+
+### `accessibilityHint`
+
+An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `accessibilityLabel`
+
+Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the `Text` nodes separated by space.
+
+| Type | Required |
+| ---- | -------- |
+| node | No |
+
+---
+
+### `accessibilityRole`
+
+| Type | Required |
+| ------------------ | -------- |
+| AccessibilityRoles | No |
+
+---
+
+### `accessibilityStates`
+
+| Type | Required |
+| ---------------------------- | -------- |
+| array of AccessibilityStates | No |
+
+---
+
+### `accessibilityTraits`
+
+_> Note: `accessibilityTraits`will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead._
+
+| Type | Required |
+| -------------------------------------------------- | -------- |
+| AccessibilityTraits, ,array of AccessibilityTraits | No |
+
+---
+
+### `accessible`
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `delayLongPress`
+
+Delay in ms, from onPressIn, before onLongPress is called.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `delayPressIn`
+
+Delay in ms, from the start of the touch, before onPressIn is called.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `delayPressOut`
+
+Delay in ms, from the release of the touch, before onPressOut is called.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `disabled`
+
+If true, disable all interactions for this component.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `hitSlop`
+
+This defines how far your touch can start away from the button. This is added to `pressRetentionOffset` when moving off of the button. ** NOTE ** The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.
+
+| Type | Required |
+| ------------------------------------------------------------------ | -------- |
+| object: {top: number, left: number, bottom: number, right: number} | No |
+
+### `onBlur`
+
+Invoked when the item loses focus.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onFocus`
+
+Invoked when the item receives focus.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLayout`
+
+Invoked on mount and layout changes with
+
+`{nativeEvent: {layout: {x, y, width, height}}}`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLongPress`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onPress`
+
+Called when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock).
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onPressIn`
+
+Called as soon as the touchable element is pressed and invoked even before onPress. This can be useful when making network requests.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onPressOut`
+
+Called as soon as the touch is released even before onPress.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `pressRetentionOffset`
+
+When the scroll view is disabled, this defines how far your touch may move off of the button, before deactivating the button. Once deactivated, try moving it back and you'll see that the button is once again reactivated! Move it back and forth several times while the scroll view is disabled. Ensure you pass in a constant to reduce memory allocations.
+
+| Type | Required |
+| ------------------------------------------------------------------ | -------- |
+| object: {top: number, left: number, bottom: number, right: number} | No |
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+## Type Definitions
+
+### Event
+
+| Type |
+| ------ |
+| Object |
diff --git a/docs/transforms.md b/docs/transforms.md
new file mode 100644
index 0000000..d236646
--- /dev/null
+++ b/docs/transforms.md
@@ -0,0 +1,97 @@
+---
+id: transforms
+title: Transforms
+---
+
+### Props
+
+* [`decomposedMatrix`](transforms.md#decomposedmatrix)
+* [`rotation`](transforms.md#rotation)
+* [`scaleX`](transforms.md#scalex)
+* [`scaleY`](transforms.md#scaley)
+* [`transform`](transforms.md#transform)
+* [`transformMatrix`](transforms.md#transformmatrix)
+* [`translateX`](transforms.md#translatex)
+* [`translateY`](transforms.md#translatey)
+
+---
+
+# Reference
+
+## Props
+
+### `decomposedMatrix`
+
+Deprecated. Use the transform prop instead.
+
+| Type | Required |
+| ------------------------ | -------- |
+| DecomposedMatrixPropType | No |
+
+---
+
+### `rotation`
+
+| Type | Required |
+| ---------------------------------------------------------------------------- | -------- |
+| deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.') | No |
+
+---
+
+### `scaleX`
+
+| Type | Required |
+| ---------------------------------------------------------------------------- | -------- |
+| deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.') | No |
+
+---
+
+### `scaleY`
+
+| Type | Required |
+| ---------------------------------------------------------------------------- | -------- |
+| deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.') | No |
+
+---
+
+### `transform`
+
+`transform` accepts an array of transformation objects. Each object specifies the property that will be transformed as the key, and the value to use in the transformation. Objects should not be combined. Use a single key/value pair per object.
+
+The rotate transformations require a string so that the transform may be expressed in degrees (deg) or radians (rad). For example:
+
+`transform([{ rotateX: '45deg' }, { rotateZ: '0.785398rad' }])`
+
+The skew transformations require a string so that the transform may be expressed in degrees (deg). For example:
+
+`transform([{ skewX: '45deg' }])`
+
+| Type | Required |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
+| array of object: {perspective: number}, ,object: {rotate: string}, ,object: {rotateX: string}, ,object: {rotateY: string}, ,object: {rotateZ: string}, ,object: {scale: number}, ,object: {scaleX: number}, ,object: {scaleY: number}, ,object: {translateX: number}, ,object: {translateY: number}, ,object: {skewX: string}, ,object: {skewY: string} | No |
+
+---
+
+### `transformMatrix`
+
+Deprecated. Use the transform prop instead.
+
+| Type | Required |
+| ----------------------- | -------- |
+| TransformMatrixPropType | No |
+
+---
+
+### `translateX`
+
+| Type | Required |
+| ---------------------------------------------------------------------------- | -------- |
+| deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.') | No |
+
+---
+
+### `translateY`
+
+| Type | Required |
+| ---------------------------------------------------------------------------- | -------- |
+| deprecatedPropType(ReactPropTypes.number, 'Use the transform prop instead.') | No |
diff --git a/docs/tutorial.md b/docs/tutorial.md
new file mode 100644
index 0000000..0842e68
--- /dev/null
+++ b/docs/tutorial.md
@@ -0,0 +1,45 @@
+---
+id: tutorial
+title: Learn the Basics
+---
+
+React Native is like React, but it uses native components instead of web components as building blocks. So to understand the basic structure of a React Native app, you need to understand some of the basic React concepts, like JSX, components, `state`, and `props`. If you already know React, you still need to learn some React-Native-specific stuff, like the native components. This tutorial is aimed at all audiences, whether you have React experience or not.
+
+Let's do this thing.
+
+## Hello World
+
+In accordance with the ancient traditions of our people, we must first build an app that does nothing except say "Hello, world!". Here it is:
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { Text, View } from 'react-native';
+
+export default class HelloWorldApp extends Component {
+ render() {
+ return (
+
+ Hello, world!
+
+ );
+ }
+}
+```
+
+If you are feeling curious, you can play around with sample code directly in the web simulators. You can also paste it into your `App.js` file to create a real app on your local machine.
+
+## What's going on here?
+
+Some of the things in here might not look like JavaScript to you. Don't panic. _This is the future_.
+
+First of all, ES2015 (also known as ES6) is a set of improvements to JavaScript that is now part of the official standard, but not yet supported by all browsers, so often it isn't used yet in web development. React Native ships with ES2015 support, so you can use this stuff without worrying about compatibility. `import`, `from`, `class`, and `extends` in the example above are all ES2015 features. If you aren't familiar with ES2015, you can probably pick it up just by reading through sample code like this tutorial has. If you want, [this page](https://babeljs.io/learn-es2015/) has a good overview of ES2015 features.
+
+The other unusual thing in this code example is `Hello world!`. This is JSX - a syntax for embedding XML within JavaScript. Many frameworks use a special templating language which lets you embed code inside markup language. In React, this is reversed. JSX lets you write your markup language inside code. It looks like HTML on the web, except instead of web things like `
` or ``, you use React components. In this case, `` is a built-in component that just displays some text and `View` is like the `
` or ``.
+
+## Components
+
+So this code is defining `HelloWorldApp`, a new `Component`. When you're building a React Native app, you'll be making new components a lot. Anything you see on the screen is some sort of component. A component can be pretty simple - the only thing that's required is a `render` function which returns some JSX to render.
+
+## This app doesn't do very much
+
+Good point. To make components do more interesting things, you need to [learn about Props](props.md).
diff --git a/docs/using-a-listview.md b/docs/using-a-listview.md
new file mode 100644
index 0000000..9e8ee57
--- /dev/null
+++ b/docs/using-a-listview.md
@@ -0,0 +1,105 @@
+---
+id: using-a-listview
+title: Using List Views
+---
+
+React Native provides a suite of components for presenting lists of data. Generally, you'll want to use either [FlatList](flatlist.md) or [SectionList](sectionlist.md).
+
+The `FlatList` component displays a scrolling list of changing, but similarly structured, data. `FlatList` works well for long lists of data, where the number of items might change over time. Unlike the more generic [`ScrollView`](using-a-scrollview.md), the `FlatList` only renders elements that are currently showing on the screen, not all the elements at once.
+
+The `FlatList` component requires two props: `data` and `renderItem`. `data` is the source of information for the list. `renderItem` takes one item from the source and returns a formatted component to render.
+
+This example creates a simple `FlatList` of hardcoded data. Each item in the `data` props is rendered as a `Text` component. The `FlatListBasics` component then renders the `FlatList` and all `Text` components.
+
+```SnackPlayer name=FlatList%20Basics
+import React, { Component } from 'react';
+import { AppRegistry, FlatList, StyleSheet, Text, View } from 'react-native';
+
+export default class FlatListBasics extends Component {
+ render() {
+ return (
+
+ {item.key}}
+ />
+
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ paddingTop: 22
+ },
+ item: {
+ padding: 10,
+ fontSize: 18,
+ height: 44,
+ },
+})
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => FlatListBasics);
+```
+
+If you want to render a set of data broken into logical sections, maybe with section headers, similar to `UITableView`s on iOS, then a [SectionList](sectionlist.md) is the way to go.
+
+```SnackPlayer name=SectionList%20Basics
+import React, { Component } from 'react';
+import { AppRegistry, SectionList, StyleSheet, Text, View } from 'react-native';
+
+export default class SectionListBasics extends Component {
+ render() {
+ return (
+
+ {item}}
+ renderSectionHeader={({section}) => {section.title}}
+ keyExtractor={(item, index) => index}
+ />
+
+ );
+ }
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ paddingTop: 22
+ },
+ sectionHeader: {
+ paddingTop: 2,
+ paddingLeft: 10,
+ paddingRight: 10,
+ paddingBottom: 2,
+ fontSize: 14,
+ fontWeight: 'bold',
+ backgroundColor: 'rgba(247,247,247,1.0)',
+ },
+ item: {
+ padding: 10,
+ fontSize: 18,
+ height: 44,
+ },
+})
+
+// skip this line if using Create React Native App
+AppRegistry.registerComponent('AwesomeProject', () => SectionListBasics);
+```
+
+One of the most common uses for a list view is displaying data that you fetch from a server. To do that, you will need to [learn about networking in React Native](network.md).
diff --git a/docs/using-a-scrollview.md b/docs/using-a-scrollview.md
new file mode 100644
index 0000000..4a2927b
--- /dev/null
+++ b/docs/using-a-scrollview.md
@@ -0,0 +1,64 @@
+---
+id: using-a-scrollview
+title: Using a ScrollView
+---
+
+The [ScrollView](scrollview.md) is a generic scrolling container that can host multiple components and views. The scrollable items need not be homogeneous, and you can scroll both vertically and horizontally (by setting the `horizontal` property).
+
+This example creates a vertical `ScrollView` with both images and text mixed together.
+
+```ReactNativeWebPlayer
+import React, { Component } from 'react';
+import { AppRegistry, ScrollView, Image, Text } from 'react-native';
+
+export default class IScrolledDownAndWhatHappenedNextShockedMe extends Component {
+ render() {
+ return (
+
+ Scroll me plz
+
+
+
+
+
+ If you like
+
+
+
+
+
+ Scrolling down
+
+
+
+
+
+ What's the best
+
+
+
+
+
+ Framework around?
+
+
+
+
+
+ React Native
+
+ );
+ }
+}
+
+// skip these lines if using Create React Native App
+AppRegistry.registerComponent(
+ 'AwesomeProject',
+ () => IScrolledDownAndWhatHappenedNextShockedMe);
+```
+
+ScrollViews can be configured to allow paging through views using swiping gestures by using the `pagingEnabled` props. Swiping horizontally between views can also be implemented on Android using the [ViewPagerAndroid](viewpagerandroid.md) component.
+
+A ScrollView with a single item can be used to allow the user to zoom content. Set up the `maximumZoomScale` and `minimumZoomScale` props and your user will be able to use pinch and expand gestures to zoom in and out.
+
+The ScrollView works best to present a small amount of things of a limited size. All the elements and views of a `ScrollView` are rendered, even if they are not currently shown on the screen. If you have a long list of more items than can fit on the screen, you should use a `FlatList` instead. So let's [learn about list views](using-a-listview.md) next.
diff --git a/docs/vibration.md b/docs/vibration.md
new file mode 100644
index 0000000..622999d
--- /dev/null
+++ b/docs/vibration.md
@@ -0,0 +1,79 @@
+---
+id: vibration
+title: Vibration
+---
+
+The Vibration API is exposed at `Vibration.vibrate()`. The vibration is asynchronous so this method will return immediately.
+
+There will be no effect on devices that do not support Vibration, eg. the simulator.
+
+**Note for Android:** add `` to `AndroidManifest.xml`
+
+**The vibration duration in iOS is not configurable**, so there are some differences with Android. In Android, if `pattern` is a number, it specifies the vibration duration in ms. If `pattern` is an array, those odd indices are the vibration duration, while the even ones are the separation time.
+
+In iOS, invoking `vibrate(duration)` will just ignore the duration and vibrate for a fixed time. While the `pattern` array is used to define the duration between each vibration. See below example for more.
+
+Repeatable vibration is also supported, the vibration will repeat with defined pattern until `cancel()` is called.
+
+Example:
+
+```javascript
+const DURATION = 10000;
+const PATTERN = [1000, 2000, 3000];
+
+Vibration.vibrate(DURATION);
+// Android: vibrate for 10s
+// iOS: duration is not configurable, vibrate for fixed time (about 500ms)
+
+Vibration.vibrate(PATTERN);
+// Android: wait 1s -> vibrate 2s -> wait 3s
+// iOS: wait 1s -> vibrate -> wait 2s -> vibrate -> wait 3s -> vibrate
+
+Vibration.vibrate(PATTERN, true);
+// Android: wait 1s -> vibrate 2s -> wait 3s -> wait 1s -> vibrate 2s -> wait 3s -> ...
+// iOS: wait 1s -> vibrate -> wait 2s -> vibrate -> wait 3s -> vibrate -> wait 1s -> vibrate -> wait 2s -> vibrate -> wait 3s -> vibrate -> ...
+
+Vibration.cancel();
+// Android: vibration stopped
+// iOS: vibration stopped
+```
+
+### Methods
+
+* [`vibrate`](vibration.md#vibrate)
+* [`cancel`](vibration.md#cancel)
+
+---
+
+# Reference
+
+## Methods
+
+### `vibrate()`
+
+```javascript
+Vibration.vibrate(pattern: number, Array, repeat: boolean)
+```
+
+Trigger a vibration with specified `pattern`.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | ----------------------- | -------- | ---------------------------------------------------------------------------- |
+| pattern | number or Array | Yes | Vibration pattern, accept a number or an array of numbers. Default to 400ms. |
+| repeat | boolean | No | Repeat vibration pattern until cancel(), default to false. |
+
+---
+
+### `cancel()`
+
+```javascript
+Vibration.cancel();
+```
+
+Stop vibration.
+
+```
+Vibration.cancel()
+```
diff --git a/docs/vibrationios.md b/docs/vibrationios.md
new file mode 100644
index 0000000..8ed557c
--- /dev/null
+++ b/docs/vibrationios.md
@@ -0,0 +1,30 @@
+---
+id: vibrationios
+title: VibrationIOS
+---
+
+NOTE: `VibrationIOS` is being deprecated. Use `Vibration` instead.
+
+The Vibration API is exposed at `VibrationIOS.vibrate()`. On iOS, calling this function will trigger a one second vibration. The vibration is asynchronous so this method will return immediately.
+
+There will be no effect on devices that do not support Vibration, eg. the iOS simulator.
+
+Vibration patterns are currently unsupported.
+
+### Methods
+
+* [`vibrate`](vibrationios.md#vibrate)
+
+---
+
+# Reference
+
+## Methods
+
+### `vibrate()`
+
+```javascript
+static vibrate()
+```
+
+@deprecated
diff --git a/docs/view-style-props.md b/docs/view-style-props.md
new file mode 100644
index 0000000..a695e3b
--- /dev/null
+++ b/docs/view-style-props.md
@@ -0,0 +1,250 @@
+---
+id: view-style-props
+title: View Style Props
+---
+
+### Props
+
+* [Layout Props](layout-props.md#props)
+* [Shadow Props](shadow-props.md#props)
+* [Transforms](transforms.md#props)
+* [`borderRightColor`](view-style-props.md#borderrightcolor)
+* [`backfaceVisibility`](view-style-props.md#backfacevisibility)
+* [`borderBottomColor`](view-style-props.md#borderbottomcolor)
+* [`borderBottomEndRadius`](view-style-props.md#borderbottomendradius)
+* [`borderBottomLeftRadius`](view-style-props.md#borderbottomleftradius)
+* [`borderBottomRightRadius`](view-style-props.md#borderbottomrightradius)
+* [`borderBottomStartRadius`](view-style-props.md#borderbottomstartradius)
+* [`borderBottomWidth`](view-style-props.md#borderbottomwidth)
+* [`borderColor`](view-style-props.md#bordercolor)
+* [`borderEndColor`](view-style-props.md#borderendcolor)
+* [`borderLeftColor`](view-style-props.md#borderleftcolor)
+* [`borderLeftWidth`](view-style-props.md#borderleftwidth)
+* [`borderRadius`](view-style-props.md#borderradius)
+* [`backgroundColor`](view-style-props.md#backgroundcolor)
+* [`borderRightWidth`](view-style-props.md#borderrightwidth)
+* [`borderStartColor`](view-style-props.md#borderstartcolor)
+* [`borderStyle`](view-style-props.md#borderstyle)
+* [`borderTopColor`](view-style-props.md#bordertopcolor)
+* [`borderTopEndRadius`](view-style-props.md#bordertopendradius)
+* [`borderTopLeftRadius`](view-style-props.md#bordertopleftradius)
+* [`borderTopRightRadius`](view-style-props.md#bordertoprightradius)
+* [`borderTopStartRadius`](view-style-props.md#bordertopstartradius)
+* [`borderTopWidth`](view-style-props.md#bordertopwidth)
+* [`borderWidth`](view-style-props.md#borderwidth)
+* [`opacity`](view-style-props.md#opacity)
+* [`elevation`](view-style-props.md#elevation)
+
+---
+
+# Reference
+
+## Props
+
+### `borderRightColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `backfaceVisibility`
+
+| Type | Required |
+| ------------------------- | -------- |
+| enum('visible', 'hidden') | No |
+
+---
+
+### `borderBottomColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `borderBottomEndRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderBottomLeftRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderBottomRightRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderBottomStartRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderBottomWidth`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `borderEndColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `borderLeftColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `borderLeftWidth`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `backgroundColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `borderRightWidth`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderStartColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `borderStyle`
+
+| Type | Required |
+| --------------------------------- | -------- |
+| enum('solid', 'dotted', 'dashed') | No |
+
+---
+
+### `borderTopColor`
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `borderTopEndRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderTopLeftRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderTopRightRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderTopStartRadius`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderTopWidth`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderWidth`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `opacity`
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `elevation`
+
+(Android-only) Sets the elevation of a view, using Android's underlying [elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation). This adds a drop shadow to the item and affects z-order for overlapping views. Only supported on Android 5.0+, has no effect on earlier versions.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | Android |
diff --git a/docs/view.md b/docs/view.md
new file mode 100644
index 0000000..20b282f
--- /dev/null
+++ b/docs/view.md
@@ -0,0 +1,598 @@
+---
+id: view
+title: View
+---
+
+The most fundamental component for building a UI, `View` is a container that supports layout with [flexbox](flexbox.md), [style](style.md), [some touch handling](handling-touches.md), and [accessibility](accessibility.md) controls. `View` maps directly to the native view equivalent on whatever platform React Native is running on, whether that is a `UIView`, `
`, `android.view`, etc.
+
+`View` is designed to be nested inside other views and can have 0 to many children of any type.
+
+This example creates a `View` that wraps two colored boxes and a text component in a row with padding.
+
+```javascript
+class ViewColoredBoxesWithText extends Component {
+ render() {
+ return (
+
+
+
+ Hello World!
+
+ );
+ }
+}
+```
+
+> `View`s are designed to be used with [`StyleSheet`](style.md) for clarity and performance, although inline styles are also supported.
+
+### Synthetic Touch Events
+
+For `View` responder props (e.g., `onResponderMove`), the synthetic touch event passed to them are of the following form:
+
+* `nativeEvent`
+ * `changedTouches` - Array of all touch events that have changed since the last event.
+ * `identifier` - The ID of the touch.
+ * `locationX` - The X position of the touch, relative to the element.
+ * `locationY` - The Y position of the touch, relative to the element.
+ * `pageX` - The X position of the touch, relative to the root element.
+ * `pageY` - The Y position of the touch, relative to the root element.
+ * `target` - The node id of the element receiving the touch event.
+ * `timestamp` - A time identifier for the touch, useful for velocity calculation.
+ * `touches` - Array of all current touches on the screen.
+
+### Props
+
+* [`onStartShouldSetResponder`](view.md#onstartshouldsetresponder)
+* [`accessibilityLabel`](view.md#accessibilitylabel)
+* [`accessibilityHint`](view.md#accessibilityhint)
+* [`hitSlop`](view.md#hitslop)
+* [`nativeID`](view.md#nativeid)
+* [`onAccessibilityTap`](view.md#onaccessibilitytap)
+* [`onLayout`](view.md#onlayout)
+* [`onMagicTap`](view.md#onmagictap)
+* [`onAccessibilityEscape`](view.md#onaccessibilityescape)
+* [`onMoveShouldSetResponder`](view.md#onmoveshouldsetresponder)
+* [`onMoveShouldSetResponderCapture`](view.md#onmoveshouldsetrespondercapture)
+* [`onResponderGrant`](view.md#onrespondergrant)
+* [`onResponderMove`](view.md#onrespondermove)
+* [`onResponderReject`](view.md#onresponderreject)
+* [`onResponderRelease`](view.md#onresponderrelease)
+* [`onResponderTerminate`](view.md#onresponderterminate)
+* [`onResponderTerminationRequest`](view.md#onresponderterminationrequest)
+* [`accessible`](view.md#accessible)
+* [`onStartShouldSetResponderCapture`](view.md#onstartshouldsetrespondercapture)
+* [`pointerEvents`](view.md#pointerevents)
+* [`removeClippedSubviews`](view.md#removeclippedsubviews)
+* [`style`](view.md#style)
+* [`testID`](view.md#testid)
+* [`accessibilityComponentType`](view.md#accessibilitycomponenttype)
+* [`accessibilityLiveRegion`](view.md#accessibilityliveregion)
+* [`collapsable`](view.md#collapsable)
+* [`importantForAccessibility`](view.md#importantforaccessibility)
+* [`needsOffscreenAlphaCompositing`](view.md#needsoffscreenalphacompositing)
+* [`renderToHardwareTextureAndroid`](view.md#rendertohardwaretextureandroid)
+* [`accessibilityRole`](view.md#accessibilityrole)
+* [`accessibilityStates`](view.md#accessibilitystates)
+* [`accessibilityTraits`](view.md#accessibilitytraits)
+* [`accessibilityViewIsModal`](view.md#accessibilityviewismodal)
+* [`accessibilityElementsHidden`](view.md#accessibilityElementsHidden)
+* [`accessibilityIgnoresInvertColors`](view.md#accessibilityIgnoresInvertColors)
+* [`shouldRasterizeIOS`](view.md#shouldrasterizeios)
+
+---
+
+# Reference
+
+## Props
+
+### `onStartShouldSetResponder`
+
+Does this view want to become responder on the start of a touch?
+
+`View.props.onStartShouldSetResponder: (event) => [true | false]`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `accessibilityHint`
+
+An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `accessibilityLabel`
+
+Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the `Text` nodes separated by space.
+
+| Type | Required |
+| ---- | -------- |
+| node | No |
+
+---
+
+### `hitSlop`
+
+This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels.
+
+For example, if a touchable view has a height of 20 the touchable height can be extended to 40 with `hitSlop={{top: 10, bottom: 10, left: 0, right: 0}}`
+
+> The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.
+
+| Type | Required |
+| ------------------------------------------------------------------ | -------- |
+| object: {top: number, left: number, bottom: number, right: number} | No |
+
+---
+
+### `nativeID`
+
+Used to locate this view from native classes.
+
+> This disables the 'layout-only view removal' optimization for this view!
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `onAccessibilityTap`
+
+When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gesture.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLayout`
+
+Invoked on mount and layout changes with:
+
+`{nativeEvent: { layout: {x, y, width, height}}}`
+
+This event is fired immediately once the layout has been calculated, but the new layout may not yet be reflected on the screen at the time the event is received, especially if a layout animation is in progress.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onMagicTap`
+
+When `accessible` is `true`, the system will invoke this function when the user performs the magic tap gesture.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onAccessibilityEscape`
+
+When `accessible` is `true`, the system will invoke this function when the user performs the escape gesture.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onMoveShouldSetResponder`
+
+Does this view want to "claim" touch responsiveness? This is called for every touch move on the `View` when it is not the responder.
+
+`View.props.onMoveShouldSetResponder: (event) => [true | false]`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onMoveShouldSetResponderCapture`
+
+If a parent `View` wants to prevent a child `View` from becoming responder on a move, it should have this handler which returns `true`.
+
+`View.props.onMoveShouldSetResponderCapture: (event) => [true | false]`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onResponderGrant`
+
+The View is now responding for touch events. This is the time to highlight and show the user what is happening.
+
+`View.props.onResponderGrant: (event) => {}`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onResponderMove`
+
+The user is moving their finger.
+
+`View.props.onResponderMove: (event) => {}`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onResponderReject`
+
+Another responder is already active and will not release it to that `View` asking to be the responder.
+
+`View.props.onResponderReject: (event) => {}`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onResponderRelease`
+
+Fired at the end of the touch.
+
+`View.props.onResponderRelease: (event) => {}`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onResponderTerminate`
+
+The responder has been taken from the `View`. Might be taken by other views after a call to `onResponderTerminationRequest`, or might be taken by the OS without asking (e.g., happens with control center/ notification center on iOS)
+
+`View.props.onResponderTerminate: (event) => {}`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onResponderTerminationRequest`
+
+Some other `View` wants to become responder and is asking this `View` to release its responder. Returning `true` allows its release.
+
+`View.props.onResponderTerminationRequest: (event) => {}`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `accessible`
+
+When `true`, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `onStartShouldSetResponderCapture`
+
+If a parent `View` wants to prevent a child `View` from becoming responder on a touch start, it should have this handler which returns `true`.
+
+`View.props.onStartShouldSetResponderCapture: (event) => [true | false]`, where `event` is a synthetic touch event as described above.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `pointerEvents`
+
+Controls whether the `View` can be the target of touch events.
+
+* `'auto'`: The View can be the target of touch events.
+* `'none'`: The View is never the target of touch events.
+* `'box-none'`: The View is never the target of touch events but it's subviews can be. It behaves like if the view had the following classes in CSS:
+
+```
+.box-none {
+ pointer-events: none;
+}
+.box-none * {
+ pointer-events: all;
+}
+```
+
+* `'box-only'`: The view can be the target of touch events but it's subviews cannot be. It behaves like if the view had the following classes in CSS:
+
+```
+.box-only {
+ pointer-events: all;
+}
+.box-only * {
+ pointer-events: none;
+}
+```
+
+> Since `pointerEvents` does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include `pointerEvents` on `style`. On some platforms, we would need to implement it as a `className` anyways. Using `style` or not is an implementation detail of the platform.
+
+| Type | Required |
+| -------------------------------------------- | -------- |
+| enum('box-none', 'none', 'box-only', 'auto') | No |
+
+---
+
+### `removeClippedSubviews`
+
+This is a special performance property exposed by `RCTView` and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have `overflow: hidden`, as should the containing view (or one of its superviews).
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `style`
+
+| Type | Required |
+| ---------------------------------- | -------- |
+| [view styles](view-style-props.md) | No |
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+> This disables the 'layout-only view removal' optimization for this view!
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `accessibilityComponentType`
+
+_> Note: `accessibilityComponentType`will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead._
+
+Indicates to accessibility services to treat UI component like a native one. Works for Android only.
+
+Possible values are one of:
+
+* `'none'`
+* `'button'`
+* `'radiobutton_checked'`
+* `'radiobutton_unchecked'`
+
+| Type | Required | Platform |
+| --------------------------- | -------- | -------- |
+| AccessibilityComponentTypes | No | Android |
+
+---
+
+### `accessibilityLiveRegion`
+
+Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. Possible values:
+
+* `'none'` - Accessibility services should not announce changes to this view.
+* `'polite'`- Accessibility services should announce changes to this view.
+* `'assertive'` - Accessibility services should interrupt ongoing speech to immediately announce changes to this view.
+
+See the [Android `View` docs](http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion) for reference.
+
+| Type | Required | Platform |
+| ----------------------------------- | -------- | -------- |
+| enum('none', 'polite', 'assertive') | No | Android |
+
+---
+
+### `collapsable`
+
+Views that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to `false` to disable this optimization and ensure that this `View` exists in the native view hierarchy.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `importantForAccessibility`
+
+Controls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only.
+
+Possible values:
+
+* `'auto'` - The system determines whether the view is important for accessibility - default (recommended).
+* `'yes'` - The view is important for accessibility.
+* `'no'` - The view is not important for accessibility.
+* `'no-hide-descendants'` - The view is not important for accessibility, nor are any of its descendant views.
+
+See the [Android `importantForAccessibility` docs](http://developer.android.com/reference/android/R.attr.html#importantForAccessibility) for reference.
+
+| Type | Required | Platform |
+| ------------------------------------------------ | -------- | -------- |
+| enum('auto', 'yes', 'no', 'no-hide-descendants') | No | Android |
+
+---
+
+### `needsOffscreenAlphaCompositing`
+
+Whether this `View` needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (`false`) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the `View` you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping `View`s, or text and a background).
+
+Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view **contents** are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `renderToHardwareTextureAndroid`
+
+Whether this `View` should render itself (and all of its children) into a single hardware texture on the GPU.
+
+On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can just be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `accessibilityRole`
+
+_> Note: `AccessibilityRole` and `AccessibilityStates` are meant to be a cross-platform solution to replace `accessibilityTraits` and `accessibilityComponentType`, which will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead of `accessibilityTraits` and `accessibilityComponentType`._
+
+Tells the screen reader to treat the currently focused on element as having a specific role.
+
+Possible values for `AccessibilityRole` is one of:
+
+* `'none'` - The element has no role.
+* `'button'` - The element should be treated as a button.
+* `'link'` - The element should be treated as a link.
+* `'header'` - The element is a header that divides content into sections.
+* `'search'` - The element should be treated as a search field.
+* `'image'` - The element should be treated as an image.
+* `'key'` - The element should be treated like a keyboard key.
+* `'text'` - The element should be treated as text.
+* `'summary'` - The element provides app summary information.
+* `'imagebutton'` - The element has the role of both an image and also a button.
+* `'adjustable'` - The element allows adjustment over a range of values.
+
+On iOS, these roles map to corresponding Accessibility Traits. Image button has the same functionality as if the trait was set to both 'image' and 'button'. See the [Accessibility guide](accessibility.md#accessibilitytraits-ios) for more information.
+
+On Android, these roles have similar functionality on TalkBack as adding Accessibility Traits does on Voiceover in iOS
+
+| Type | Required |
+| ----------------- | -------- |
+| AccessibilityRole | No |
+
+---
+
+### `accessibilityStates`
+
+_> Note: `AccessibilityRole` and `AccessibilityStates` are meant to be a cross-platform solution to replace `accessibilityTraits` and `accessibilityComponentType`, which will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead of `accessibilityTraits` and `accessibilityComponentType`._
+
+Tells the screen reader to treat the currently focused on element as being in a specific state.
+
+You can provide one state, no state, or both states. The states must be passed in through an array. Ex: ['selected'] or ['selected', 'disabled']
+
+Possible values for `AccessibilityStates` are:
+
+* `'selected'` - The element is in a selected state.
+* `'disabled'` - The element is in a disabled state.
+
+| Type | Required |
+| --------------------------- | -------- |
+| array of AccessibilitStates | No |
+
+---
+
+### `accessibilityTraits`
+
+_> Note: `accessibilityTraits` will soon be deprecated. When possible, use `accessibilityRole` and `accessibilityStates` instead._
+
+Provides additional traits to screen reader. By default no traits are provided unless specified otherwise in element.
+
+You can provide one trait or an array of many traits.
+
+Possible values for `AccessibilityTraits` are:
+
+* `'none'` - The element has no traits.
+* `'button'` - The element should be treated as a button.
+* `'link'` - The element should be treated as a link.
+* `'header'` - The element is a header that divides content into sections.
+* `'search'` - The element should be treated as a search field.
+* `'image'` - The element should be treated as an image.
+* `'selected'` - The element is selected.
+* `'plays'` - The element plays sound.
+* `'key'` - The element should be treated like a keyboard key.
+* `'text'` - The element should be treated as text.
+* `'summary'` - The element provides app summary information.
+* `'disabled'` - The element is disabled.
+* `'frequentUpdates'` - The element frequently changes its value.
+* `'startsMedia'` - The element starts a media session.
+* `'adjustable'` - The element allows adjustment over a range of values.
+* `'allowsDirectInteraction'` - The element allows direct touch interaction for VoiceOver users.
+* `'pageTurn'` - Informs VoiceOver that it should scroll to the next page when it finishes reading the contents of the element.
+
+See the [Accessibility guide](accessibility.md#accessibilitytraits-ios) for more information.
+
+| Type | Required | Platform |
+| -------------------------------------------------- | -------- | -------- |
+| AccessibilityTraits, ,array of AccessibilityTraits | No | iOS |
+
+---
+
+### `accessibilityViewIsModal`
+
+A value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. Default is `false`.
+
+See the [Accessibility guide](accessibility.md#accessibilityviewismodal-ios) for more information.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `accessibilityElementsHidden`
+
+A value indicating whether the accessibility elements contained within this accessibility element are hidden. Default is `false`.
+
+See the [Accessibility guide](accessibility.md#accessibilityelementshidden-ios) for more information.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `accessibilityIgnoresInvertColors`
+
+A value indicating this view should or should not be inverted when color inversion is turned on. A value of `true` will tell the view to not be inverted even if color inversion is turned on.
+
+See the [Accessibility guide](accessibility.md#accessibilityignoresinvertcolors) for more information.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `shouldRasterizeIOS`
+
+Whether this `View` should be rendered as a bitmap before compositing.
+
+On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame.
+
+Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
diff --git a/docs/viewpagerandroid.md b/docs/viewpagerandroid.md
new file mode 100644
index 0000000..c08915d
--- /dev/null
+++ b/docs/viewpagerandroid.md
@@ -0,0 +1,195 @@
+---
+id: viewpagerandroid
+title: ViewPagerAndroid
+---
+
+Container that allows to flip left and right between child views. Each child view of the `ViewPagerAndroid` will be treated as a separate page and will be stretched to fill the `ViewPagerAndroid`.
+
+It is important all children are ``s and not composite components. You can set style properties like `padding` or `backgroundColor` for each child. It is also important that each child have a `key` prop.
+
+Example:
+
+```javascript
+render: function() {
+ return (
+
+
+ First page
+
+
+ Second page
+
+
+ );
+}
+
+...
+
+var styles = {
+ ...
+ viewPager: {
+ flex: 1
+ },
+ pageStyle: {
+ alignItems: 'center',
+ padding: 20,
+ }
+}
+```
+
+### Props
+
+* [View props...](view.md#props)
+
+* [`initialPage`](viewpagerandroid.md#initialpage)
+* [`keyboardDismissMode`](viewpagerandroid.md#keyboarddismissmode)
+* [`onPageScroll`](viewpagerandroid.md#onpagescroll)
+* [`onPageScrollStateChanged`](viewpagerandroid.md#onpagescrollstatechanged)
+* [`onPageSelected`](viewpagerandroid.md#onpageselected)
+* [`pageMargin`](viewpagerandroid.md#pagemargin)
+* [`peekEnabled`](viewpagerandroid.md#peekenabled)
+* [`scrollEnabled`](viewpagerandroid.md#scrollenabled)
+* [`setPage`](viewpagerandroid.md#setpage)
+* [`setPageWithoutAnimation`](viewpagerandroid.md#setpagewithoutanimation)
+
+### Type Definitions
+
+* [`ViewPagerScrollState`](viewpagerandroid.md#viewpagerscrollstate)
+
+---
+
+# Reference
+
+## Props
+
+### `initialPage`
+
+Index of initial page that should be selected. Use `setPage` method to update the page, and `onPageSelected` to monitor page changes
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `keyboardDismissMode`
+
+Determines whether the keyboard gets dismissed in response to a drag.
+
+* 'none' (the default), drags do not dismiss the keyboard.
+* 'on-drag', the keyboard is dismissed when a drag begins.
+
+| Type | Required |
+| ----------------------- | -------- |
+| enum('none', 'on-drag') | No |
+
+---
+
+### `onPageScroll`
+
+Executed when transitioning between pages (either because of animation for the requested page change or when user is swiping/dragging between pages) The `event.nativeEvent` object for this callback will carry following data:
+
+* position - index of first page from the left that is currently visible
+* offset - value from range [0, 1] describing stage between page transitions. Value x means that (1 - x) fraction of the page at "position" index is visible, and x fraction of the next page is visible.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onPageScrollStateChanged`
+
+Function called when the page scrolling state has changed. The page scrolling state can be in 3 states:
+
+* idle, meaning there is no interaction with the page scroller happening at the time
+* dragging, meaning there is currently an interaction with the page scroller
+* settling, meaning that there was an interaction with the page scroller, and the page scroller is now finishing its closing or opening animation
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onPageSelected`
+
+This callback will be called once ViewPager finish navigating to selected page (when user swipes between pages). The `event.nativeEvent` object passed to this callback will have following fields:
+
+* position - index of page that has been selected
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `pageMargin`
+
+Blank space to show between pages. This is only visible while scrolling, pages are still edge-to-edge.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `peekEnabled`
+
+Whether enable showing peekFraction or not. If this is true, the preview of last and next page will show in current screen. Defaults to false.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `scrollEnabled`
+
+When false, the content does not scroll. The default value is true.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `setPage`
+
+A helper function to scroll to a specific page in the ViewPager. The transition between pages will be animated.
+
+* position - index of page that will be selected
+
+| Type | Required |
+| ------ | -------- |
+| Number | Yes |
+
+---
+
+### `setPageWithoutAnimation`
+
+A helper function to scroll to a specific page in the ViewPager. The transition between pages will _not_ be animated.
+
+* position - index of page that will be selected
+
+| Type | Required |
+| ------ | -------- |
+| Number | Yes |
+
+## Type Definitions
+
+### ViewPagerScrollState
+
+| Type |
+| ----- |
+| $Enum |
+
+**Constants:**
+
+| Value | Description |
+| -------- | ----------- |
+| idle | |
+| dragging | |
+| settling | |
diff --git a/docs/virtualizedlist.md b/docs/virtualizedlist.md
new file mode 100644
index 0000000..399c993
--- /dev/null
+++ b/docs/virtualizedlist.md
@@ -0,0 +1,484 @@
+---
+id: virtualizedlist
+title: VirtualizedList
+---
+
+Base implementation for the more convenient [``](flatlist.md) and [``](sectionlist.md) components, which are also better documented. In general, this should only really be used if you need more flexibility than [`FlatList`](flatlist.md) provides, e.g. for use with immutable data instead of plain arrays.
+
+Virtualization massively improves memory consumption and performance of large lists by maintaining a finite render window of active items and replacing all items outside of the render window with appropriately sized blank space. The window adapts to scrolling behavior, and items are rendered incrementally with low-pri (after any running interactions) if they are far from the visible area, or with hi-pri otherwise to minimize the potential of seeing blank space.
+
+Some caveats:
+
+* Internal state is not preserved when content scrolls out of the render window. Make sure all your data is captured in the item data or external stores like Flux, Redux, or Relay.
+* This is a `PureComponent` which means that it will not re-render if `props` remain shallow- equal. Make sure that everything your `renderItem` function depends on is passed as a prop (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on changes. This includes the `data` prop and parent component state.
+* In order to constrain memory and enable smooth scrolling, content is rendered asynchronously offscreen. This means it's possible to scroll faster than the fill rate and momentarily see blank content. This is a tradeoff that can be adjusted to suit the needs of each application, and we are working on improving it behind the scenes.
+* By default, the list looks for a `key` prop on each item and uses that for the React key. Alternatively, you can provide a custom `keyExtractor` prop.
+
+### Props
+
+* [`ScrollView` props...](scrollview.md#props)
+* [`renderItem`](virtualizedlist.md#renderitem)
+* [`data`](virtualizedlist.md#data)
+* [`getItem`](virtualizedlist.md#getitem)
+* [`getItemCount`](virtualizedlist.md#getitemcount)
+* [`debug`](virtualizedlist.md#debug)
+* [`extraData`](virtualizedlist.md#extradata)
+* [`getItemLayout`](virtualizedlist.md#getitemlayout)
+* [`initialScrollIndex`](virtualizedlist.md#initialscrollindex)
+* [`inverted`](virtualizedlist.md#inverted)
+* [`CellRendererComponent`](virtualizedlist.md#cellrenderercomponent)
+* [`ListEmptyComponent`](virtualizedlist.md#listemptycomponent)
+* [`ListFooterComponent`](virtualizedlist.md#listfootercomponent)
+* [`ListHeaderComponent`](virtualizedlist.md#listheadercomponent)
+* [`onEndReached`](virtualizedlist.md#onendreached)
+* [`onLayout`](virtualizedlist.md#onlayout)
+* [`onRefresh`](virtualizedlist.md#onrefresh)
+* [`onScrollToIndexFailed`](virtualizedlist.md#onscrolltoindexfailed)
+* [`onViewableItemsChanged`](virtualizedlist.md#onviewableitemschanged)
+* [`refreshing`](virtualizedlist.md#refreshing)
+* [`removeClippedSubviews`](virtualizedlist.md#removeclippedsubviews)
+* [`renderScrollComponent`](virtualizedlist.md#renderscrollcomponent)
+* [`viewabilityConfig`](virtualizedlist.md#viewabilityconfig)
+* [`viewabilityConfigCallbackPairs`](virtualizedlist.md#viewabilityconfigcallbackpairs)
+* [`horizontal`](virtualizedlist.md#horizontal)
+* [`initialNumToRender`](virtualizedlist.md#initialnumtorender)
+* [`keyExtractor`](virtualizedlist.md#keyextractor)
+* [`maxToRenderPerBatch`](virtualizedlist.md#maxtorenderperbatch)
+* [`onEndReachedThreshold`](virtualizedlist.md#onendreachedthreshold)
+* [`updateCellsBatchingPeriod`](virtualizedlist.md#updatecellsbatchingperiod)
+* [`windowSize`](virtualizedlist.md#windowsize)
+* [`disableVirtualization`](virtualizedlist.md#disablevirtualization)
+* [`progressViewOffset`](virtualizedlist.md#progressviewoffset)
+
+### Methods
+
+* [`scrollToEnd`](virtualizedlist.md#scrolltoend)
+* [`scrollToIndex`](virtualizedlist.md#scrolltoindex)
+* [`scrollToItem`](virtualizedlist.md#scrolltoitem)
+* [`scrollToOffset`](virtualizedlist.md#scrolltooffset)
+* [`recordInteraction`](virtualizedlist.md#recordinteraction)
+* [`flashScrollIndicators`](virtualizedlist.md#flashscrollindicators)
+
+---
+
+# Reference
+
+## Props
+
+### `renderItem`
+
+```javascript
+(info: any) => ?React.Element
+```
+
+Takes an item from `data` and renders it into the list
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+---
+
+### `data`
+
+The default accessor functions assume this is an array of objects with shape `{key: string}` but you can override `getItem`, `getItemCount`, and `keyExtractor` to handle any type of index-based data.
+
+| Type | Required |
+| ---- | -------- |
+| any | Yes |
+
+---
+
+### `getItem`
+
+```javascript
+(data: any, index: number) => object;
+```
+
+A generic accessor for extracting an item from any sort of data blob.
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+---
+
+### `getItemCount`
+
+```javascript
+(data: any) => number;
+```
+
+Determines how many items are in the data blob.
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+---
+
+### `debug`
+
+`debug` will turn on extra logging and visual overlays to aid with debugging both usage and implementation, but with a significant perf hit.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `extraData`
+
+A marker property for telling the list to re-render (since it implements `PureComponent`). If any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the `data` prop, stick it here and treat it immutably.
+
+| Type | Required |
+| ---- | -------- |
+| any | No |
+
+---
+
+### `getItemLayout`
+
+```javascript
+(
+ data: any,
+ index: number,
+ ) => {length: number, offset: number, index: number}
+```
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `initialScrollIndex`
+
+Instead of starting at the top with the first item, start at `initialScrollIndex`. This disables the "scroll to top" optimization that keeps the first `initialNumToRender` items always rendered and immediately renders the items starting at this initial index. Requires `getItemLayout` to be implemented.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `inverted`
+
+Reverses the direction of scroll. Uses scale transforms of -1.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `CellRendererComponent`
+
+Each cell is rendered using this element. Can be a React Component Class,or a render function. Defaults to using [`View`](view.md).
+
+| Type | Required |
+| ------------------- | -------- |
+| component, function | No |
+
+---
+
+### `ListEmptyComponent`
+
+Rendered when the list is empty. Can be a React Component Class, a render function, or a rendered element.
+
+| Type | Required |
+| ---------------------------- | -------- |
+| component, function, element | No |
+
+---
+
+### `ListFooterComponent`
+
+Rendered at the bottom of all the items. Can be a React Component Class, a render function, or a rendered element.
+
+| Type | Required |
+| ---------------------------- | -------- |
+| component, function, element | No |
+
+---
+
+### `ListHeaderComponent`
+
+Rendered at the top of all the items. Can be a React Component Class, a render function, or a rendered element.
+
+| Type | Required |
+| ---------------------------- | -------- |
+| component, function, element | No |
+
+---
+
+### `onLayout`
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onRefresh`
+
+```javascript
+() => void
+```
+
+If provided, a standard `RefreshControl` will be added for "Pull to Refresh" functionality. Make sure to also set the `refreshing` prop correctly.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onScrollToIndexFailed`
+
+```javascript
+(info: {
+ index: number,
+ highestMeasuredFrameIndex: number,
+ averageItemLength: number,
+ }) => void
+```
+
+Used to handle failures when scrolling to an index that has not been measured yet. Recommended action is to either compute your own offset and `scrollTo` it, or scroll as far as possible and then try again after more items have been rendered.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onViewableItemsChanged`
+
+```javascript
+(info: {
+ viewableItems: array,
+ changed: array,
+ }) => void
+```
+
+Called when the viewability of rows changes, as defined by the `viewabilityConfig` prop.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `refreshing`
+
+Set this true while waiting for new data from a refresh.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `removeClippedSubviews`
+
+This may improve scroll performance for large lists.
+
+> Note: May have bugs (missing content) in some circumstances - use at your own risk.
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `renderScrollComponent`
+
+```javascript
+(props: object) => element;
+```
+
+Render a custom scroll component, e.g. with a differently styled `RefreshControl`.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `viewabilityConfig`
+
+See `ViewabilityHelper.js` for flow type and further documentation.
+
+| Type | Required |
+| ----------------- | -------- |
+| ViewabilityConfig | No |
+
+---
+
+### `viewabilityConfigCallbackPairs`
+
+List of `ViewabilityConfig`/`onViewableItemsChanged` pairs. A specific `onViewableItemsChanged` will be called when its corresponding `ViewabilityConfig`'s conditions are met. See `ViewabilityHelper.js` for flow type and further documentation.
+
+| Type | Required |
+| -------------------------------------- | -------- |
+| array of ViewabilityConfigCallbackPair | No |
+
+---
+
+### `horizontal`
+
+| Type | Required |
+| ------- | -------- |
+| boolean | No |
+
+---
+
+### `initialNumToRender`
+
+How many items to render in the initial batch. This should be enough to fill the screen but not much more. Note these items will never be unmounted as part of the windowed rendering in order to improve perceived performance of scroll-to-top actions.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `keyExtractor`
+
+```javascript
+(item: object, index: number) => string;
+```
+
+Used to extract a unique key for a given item at the specified index. Key is used for caching and as the react key to track item re-ordering. The default extractor checks `item.key`, then falls back to using the index, like React does.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `maxToRenderPerBatch`
+
+The maximum number of items to render in each incremental render batch. The more rendered at once, the better the fill rate, but responsiveness may suffer because rendering content may interfere with responding to button taps or other interactions.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `onEndReached`
+
+```javascript
+(info: {distanceFromEnd: number}) => void
+```
+
+Called once when the scroll position gets within `onEndReachedThreshold` of the rendered content.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onEndReachedThreshold`
+
+How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the `onEndReached` callback. Thus a value of 0.5 will trigger `onEndReached` when the end of the content is within half the visible length of the list.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `updateCellsBatchingPeriod`
+
+Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `windowSize`
+
+Determines the maximum number of items rendered outside of the visible area, in units of visible lengths. So if your list fills the screen, then `windowSize={21}` (the default) will render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing this number will reduce memory consumption and may improve performance, but will increase the chance that fast scrolling may reveal momentary blank areas of unrendered content.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `disableVirtualization`
+
+**DEPRECATED.** Virtualization provides significant performance and memory optimizations, but fully unmounts react instances that are outside of the render window. You should only need to disable this for debugging purposes.
+
+| Type | Required |
+| ---- | -------- |
+| | No |
+
+---
+
+### `progressViewOffset`
+
+Set this when offset is needed for the loading indicator to show correctly.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | Android |
+
+## Methods
+
+### `scrollToEnd()`
+
+```javascript
+scrollToEnd(([params]: object));
+```
+
+---
+
+### `scrollToIndex()`
+
+```javascript
+scrollToIndex((params: object));
+```
+
+---
+
+### `scrollToItem()`
+
+```javascript
+scrollToItem((params: object));
+```
+
+---
+
+### `scrollToOffset()`
+
+```javascript
+scrollToOffset((params: object));
+```
+
+Scroll to a specific content pixel offset in the list.
+
+Param `offset` expects the offset to scroll to. In case of `horizontal` is true, the offset is the x-value, in any other case the offset is the y-value.
+
+Param `animated` (`true` by default) defines whether the list should do an animation while scrolling.
+
+---
+
+### `recordInteraction()`
+
+```javascript
+recordInteraction();
+```
+
+---
+
+### `flashScrollIndicators()`
+
+```javascript
+flashScrollIndicators();
+```
diff --git a/docs/webview.md b/docs/webview.md
new file mode 100644
index 0000000..a697543
--- /dev/null
+++ b/docs/webview.md
@@ -0,0 +1,545 @@
+---
+id: webview
+title: WebView
+---
+
+> **Warning** Please use the [react-native-community/react-native-webview](https://github.com/react-native-community/react-native-webview) fork of this component instead. To reduce the surface area of React Native, `` is going to be removed from the React Native core. For more information, please read [The Slimmening proposal](https://github.com/react-native-community/discussions-and-proposals/issues/6).
+
+`WebView` renders web content in a native view.
+
+```javascript
+import React, {Component} from 'react';
+import {WebView} from 'react-native';
+
+class MyWeb extends Component {
+ render() {
+ return (
+
+ );
+ }
+}
+```
+
+Minimal example with inline HTML:
+
+```javascript
+import React, {Component} from 'react';
+import {WebView} from 'react-native';
+
+class MyInlineWeb extends Component {
+ render() {
+ return (
+ Hello world'}}
+ />
+ );
+ }
+}
+```
+
+You can use this component to navigate back and forth in the web view's history and configure various properties for the web content.
+
+On iOS, the `useWebKit` prop can be used to opt into a WKWebView-backed implementation.
+
+> **Security Warning:** Currently, `onMessage` and `postMessage` do not allow specifying an origin. This can lead to cross-site scripting attacks if an unexpected document is loaded within a `WebView` instance. Please refer to the MDN documentation for [`Window.postMessage()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) for more details on the security implications of this.
+
+### Props
+
+* [View props...](view.md#props)
+
+- [`source`](webview.md#source)
+- [`automaticallyAdjustContentInsets`](webview.md#automaticallyadjustcontentinsets)
+- [`injectJavaScript`](webview.md#injectjavascript)
+- [`injectedJavaScript`](webview.md#injectedjavascript)
+- [`mediaPlaybackRequiresUserAction`](webview.md#mediaplaybackrequiresuseraction)
+- [`nativeConfig`](webview.md#nativeconfig)
+- [`onError`](webview.md#onerror)
+- [`onLoad`](webview.md#onload)
+- [`onLoadEnd`](webview.md#onloadend)
+- [`onLoadStart`](webview.md#onloadstart)
+- [`onMessage`](webview.md#onmessage)
+- [`onNavigationStateChange`](webview.md#onnavigationstatechange)
+- [`originWhitelist`](webview.md#originwhitelist)
+- [`renderError`](webview.md#rendererror)
+- [`renderLoading`](webview.md#renderloading)
+- [`scalesPageToFit`](webview.md#scalespagetofit)
+- [`onShouldStartLoadWithRequest`](webview.md#onshouldstartloadwithrequest)
+- [`startInLoadingState`](webview.md#startinloadingstate)
+- [`style`](webview.md#style)
+- [`decelerationRate`](webview.md#decelerationrate)
+- [`domStorageEnabled`](webview.md#domstorageenabled)
+- [`javaScriptEnabled`](webview.md#javascriptenabled)
+- [`mixedContentMode`](webview.md#mixedcontentmode)
+- [`thirdPartyCookiesEnabled`](webview.md#thirdpartycookiesenabled)
+- [`userAgent`](webview.md#useragent)
+- [`allowsInlineMediaPlayback`](webview.md#allowsinlinemediaplayback)
+- [`allowFileAccess`](webview.md#allowFileAccess)
+- [`bounces`](webview.md#bounces)
+- [`contentInset`](webview.md#contentinset)
+- [`dataDetectorTypes`](webview.md#datadetectortypes)
+- [`scrollEnabled`](webview.md#scrollenabled)
+- [`geolocationEnabled`](webview.md#geolocationenabled)
+- [`allowUniversalAccessFromFileURLs`](webview.md#allowUniversalAccessFromFileURLs)
+- [`useWebKit`](webview.md#usewebkit)
+- [`url`](webview.md#url)
+- [`html`](webview.md#html)
+
+### Methods
+
+* [`extraNativeComponentConfig`](webview.md#extranativecomponentconfig)
+* [`goForward`](webview.md#goforward)
+* [`goBack`](webview.md#goback)
+* [`reload`](webview.md#reload)
+* [`stopLoading`](webview.md#stoploading)
+
+---
+
+# Reference
+
+## Props
+
+### `source`
+
+Loads static HTML or a URI (with optional headers) in the WebView. Note that static HTML will require setting [`originWhitelist`](webview.md#originwhitelist) to `["*"]`.
+
+The object passed to `source` can have either of the following shapes:
+
+**Load uri**
+
+* `uri` (string) - The URI to load in the `WebView`. Can be a local or remote file.
+* `method` (string) - The HTTP Method to use. Defaults to GET if not specified. On Android, the only supported methods are GET and POST.
+* `headers` (object) - Additional HTTP headers to send with the request. On Android, this can only be used with GET requests.
+* `body` (string) - The HTTP body to send with the request. This must be a valid UTF-8 string, and will be sent exactly as specified, with no additional encoding (e.g. URL-escaping or base64) applied. On Android, this can only be used with POST requests.
+
+**Static HTML**
+
+* `html` (string) - A static HTML page to display in the WebView.
+* `baseUrl` (string) - The base URL to be used for any relative links in the HTML.
+
+| Type | Required |
+| ------ | -------- |
+| object | No |
+
+---
+
+### `automaticallyAdjustContentInsets`
+
+Controls whether to adjust the content inset for web views that are placed behind a navigation bar, tab bar, or toolbar. The default value is `true`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `injectJavaScript`
+
+Function that accepts a string that will be passed to the WebView and executed immediately as JavaScript.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `injectedJavaScript`
+
+Set this to provide JavaScript that will be injected into the web page when the view loads.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `mediaPlaybackRequiresUserAction`
+
+Boolean that determines whether HTML5 audio and video requires the user to tap them before they start playing. The default value is `true`.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `nativeConfig`
+
+Override the native component used to render the WebView. Enables a custom native WebView which uses the same JavaScript as the original WebView.
+
+The `nativeConfig` prop expects an object with the following keys:
+
+* `component` (any)
+* `props` (object)
+* `viewManager` (object)
+
+| Type | Required |
+| ------ | -------- |
+| object | No |
+
+---
+
+### `onError`
+
+Function that is invoked when the `WebView` load fails.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLoad`
+
+Function that is invoked when the `WebView` has finished loading.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLoadEnd`
+
+Function that is invoked when the `WebView` load succeeds or fails.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onLoadStart`
+
+Function that is invoked when the `WebView` starts loading.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onMessage`
+
+A function that is invoked when the webview calls `window.postMessage`. Setting this property will inject a `postMessage` global into your webview, but will still call pre-existing values of `postMessage`.
+
+`window.postMessage` accepts one argument, `data`, which will be available on the event object, `event.nativeEvent.data`. `data` must be a string.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onNavigationStateChange`
+
+Function that is invoked when the `WebView` loading starts or ends.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `originWhitelist`
+
+List of origin strings to allow being navigated to. The strings allow wildcards and get matched against _just_ the origin (not the full URL). If the user taps to navigate to a new page but the new page is not in this whitelist, the URL will be handled by the OS. The default whitelisted origins are "http://*" and "https://*".
+
+| Type | Required |
+| ---------------- | -------- |
+| array of strings | No |
+
+---
+
+### `renderError`
+
+Function that returns a view to show if there's an error.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `renderLoading`
+
+Function that returns a loading indicator. The startInLoadingState prop must be set to true in order to use this prop.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `scalesPageToFit`
+
+Boolean that controls whether the web content is scaled to fit the view and enables the user to change the scale. The default value is `true`.
+
+On iOS, when [`useWebKit=true`](webview.md#usewebkit), this prop will not work.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `onShouldStartLoadWithRequest`
+
+Function that allows custom handling of any web view requests. Return `true` from the function to continue loading the request and `false` to stop loading.
+
+| Type | Required | Platform |
+| -------- | -------- | -------- |
+| function | No | iOS |
+
+---
+
+### `startInLoadingState`
+
+Boolean value that forces the `WebView` to show the loading view on the first load. This prop must be set to `true` in order for the `renderLoading` prop to work.
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `decelerationRate`
+
+A floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. You may also use the string shortcuts `"normal"` and `"fast"` which match the underlying iOS settings for `UIScrollViewDecelerationRateNormal` and `UIScrollViewDecelerationRateFast` respectively:
+
+* normal: 0.998
+* fast: 0.99 (the default for iOS web view)
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| number | No | iOS |
+
+---
+
+### `domStorageEnabled`
+
+Boolean value to control whether DOM Storage is enabled. Used only in Android.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `javaScriptEnabled`
+
+Boolean value to enable JavaScript in the `WebView`. Used on Android only as JavaScript is enabled by default on iOS. The default value is `true`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `mixedContentMode`
+
+Specifies the mixed content mode. i.e WebView will allow a secure origin to load content from any other origin.
+
+Possible values for `mixedContentMode` are:
+
+* `never` (default) - WebView will not allow a secure origin to load content from an insecure origin.
+* `always` - WebView will allow a secure origin to load content from any other origin, even if that origin is insecure.
+* `compatibility` - WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| string | No | Android |
+
+---
+
+### `thirdPartyCookiesEnabled`
+
+Boolean value to enable third party cookies in the `WebView`. Used on Android Lollipop and above only as third party cookies are enabled by default on Android Kitkat and below and on iOS. The default value is `true`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `userAgent`
+
+Sets the user-agent for the `WebView`.
+
+| Type | Required | Platform |
+| ------ | -------- | -------- |
+| string | No | Android |
+
+---
+
+### `allowsInlineMediaPlayback`
+
+Boolean that determines whether HTML5 videos play inline or use the native full-screen controller. The default value is `false`.
+
+> **NOTE**
+>
+> In order for video to play inline, not only does this property need to be set to `true`, but the video element in the HTML document must also include the `webkit-playsinline` attribute.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `bounces`
+
+Boolean value that determines whether the web view bounces when it reaches the edge of the content. The default value is `true`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `contentInset`
+
+The amount by which the web view content is inset from the edges of the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
+
+| Type | Required | Platform |
+| ------------------------------------------------------------------ | -------- | -------- |
+| object: {top: number, left: number, bottom: number, right: number} | No | iOS |
+
+---
+
+### `dataDetectorTypes`
+
+Determines the types of data converted to clickable URLs in the web view's content. By default only phone numbers are detected.
+
+You can provide one type or an array of many types.
+
+Possible values for `dataDetectorTypes` are:
+
+* `phoneNumber`
+* `link`
+* `address`
+* `calendarEvent`
+* `none`
+* `all`
+
+With the [new WebKit](webview.md#usewebkit) implementation, we have three new values:
+
+* `trackingNumber`
+* `flightNumber`
+* `lookupSuggestion`
+
+| Type | Required | Platform |
+| ---------------- | -------- | -------- |
+| string, or array | No | iOS |
+
+---
+
+### `scrollEnabled`
+
+Boolean value that determines whether scrolling is enabled in the `WebView`. The default value is `true`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | iOS |
+
+---
+
+### `geolocationEnabled`
+
+Set whether Geolocation is enabled in the `WebView`. The default value is `false`. Used only in Android.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `allowUniversalAccessFromFileURLs`
+
+Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. Including accessing content from other file scheme URLs. The default value is `false`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `allowFileAccess`
+
+Boolean that sets whether the `WebView` has access to the file system. The default value is `false`.
+
+| Type | Required | Platform |
+| ---- | -------- | -------- |
+| bool | No | Android |
+
+---
+
+### `useWebKit`
+
+If true, use WKWebView instead of UIWebView.
+
+| Type | Required | Platform |
+| ------- | -------- | -------- |
+| boolean | No | iOS |
+
+---
+
+### `url`
+
+**Deprecated.** Use the `source` prop instead.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+---
+
+### `html`
+
+**Deprecated.** Use the `source` prop instead.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
+
+## Methods
+
+### `extraNativeComponentConfig()`
+
+```javascript
+static extraNativeComponentConfig()
+```
+
+### `goForward()`
+
+```javascript
+goForward();
+```
+
+Go forward one page in the web view's history.
+
+### `goBack()`
+
+```javascript
+goBack();
+```
+
+Go back one page in the web view's history.
+
+### `reload()`
+
+```javascript
+reload();
+```
+
+Reloads the current page.
+
+### `stopLoading()`
+
+```javascript
+stopLoading();
+```
+
+Stop loading the current page.