Skip to content

Commit 0a314ba

Browse files
committed
Rename and fix errors in 0.60 and 0.61 docs
1 parent 6e1ee9c commit 0a314ba

File tree

322 files changed

+38312
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

322 files changed

+38312
-259
lines changed

website/versioned_docs/version-0.60/accessibility.md

Lines changed: 297 additions & 0 deletions
Large diffs are not rendered by default.

website/versioned_docs/version-0.60/accessibilityinfo.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
id: version-0.60-accessibilityinfo
2+
id: accessibilityinfo
33
title: AccessibilityInfo
4-
original_id: accessibilityinfo
54
---
65

76
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.

website/versioned_docs/version-0.60/actionsheetios.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
id: version-0.60-actionsheetios
2+
id: actionsheetios
33
title: ActionSheetIOS
4-
original_id: actionsheetios
54
---
65

76
# Reference

website/versioned_docs/version-0.60/activityindicator.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
id: version-0.60-activityindicator
2+
id: activityindicator
33
title: ActivityIndicator
4-
original_id: activityindicator
54
---
65

76
Displays a circular loading indicator.

website/versioned_docs/version-0.60/alert.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
id: version-0.60-alert
2+
id: alert
33
title: Alert
4-
original_id: alert
54
---
65

76
Launches an alert dialog with the specified title and message.
@@ -14,14 +13,14 @@ This is an API that works both on Android and iOS and can show static alerts. To
1413

1514
<table>
1615
<tr>
17-
<th style="width: 50%;">iOS</th>
18-
<th style="width: 50%;">Android</th>
16+
<th style={{width: "50%"}}>iOS</th>
17+
<th style={{width: "50%"}}>Android</th>
1918
</tr>
2019
<tr>
21-
<td style="width: 50%;">
20+
<td style={{width: "50%"}}>
2221
<center><img src="/docs/assets/Alert/exampleios.gif"></img></center>
2322
</td>
24-
<td style="width: 50%;">
23+
<td style={{width: "50%"}}>
2524
<center><img src="/docs/assets/Alert/exampleandroid.gif"></img></center>
2625
</td>
2726
</tr>

website/versioned_docs/version-0.60/alertios.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
id: version-0.60-alertios
2+
id: alertios
33
title: AlertIOS
4-
original_id: alertios
54
---
65

76
> **Deprecated.** `AlertIOS` has been moved to [`Alert`](alert.md)

website/versioned_docs/version-0.60/animated.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
id: version-0.60-animated
2+
id: animated
33
title: Animated
4-
original_id: animated
54
---
65

76
The `Animated` library is designed to make animations fluid, powerful, and painless to build and maintain. `Animated` focuses on declarative relationships between inputs and outputs, with configurable transforms in between, and `start`/`stop` methods to control time-based animation execution.
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
---
2+
id: animatedvalue
3+
title: AnimatedValue
4+
---
5+
6+
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.
7+
8+
Typically initialized with `new Animated.Value(0);`
9+
10+
See also [`Animated`](animated.md).
11+
12+
### Methods
13+
14+
- [`setValue`](animatedvalue.md#setvalue)
15+
- [`setOffset`](animatedvalue.md#setoffset)
16+
- [`flattenOffset`](animatedvalue.md#flattenoffset)
17+
- [`extractOffset`](animatedvalue.md#extractoffset)
18+
- [`addListener`](animatedvalue.md#addlistener)
19+
- [`removeListener`](animatedvalue.md#removelistener)
20+
- [`removeAllListeners`](animatedvalue.md#removealllisteners)
21+
- [`stopAnimation`](animatedvalue.md#stopanimation)
22+
- [`resetAnimation`](animatedvalue.md#resetanimation)
23+
- [`interpolate`](animatedvalue.md#interpolate)
24+
- [`animate`](animatedvalue.md#animate)
25+
- [`stopTracking`](animatedvalue.md#stoptracking)
26+
- [`track`](animatedvalue.md#track)
27+
28+
---
29+
30+
# Reference
31+
32+
## Methods
33+
34+
### `setValue()`
35+
36+
```jsx
37+
setValue(value);
38+
```
39+
40+
Directly set the value. This will stop any animations running on the value and update all the bound properties.
41+
42+
**Parameters:**
43+
44+
| Name | Type | Required | Description |
45+
| ----- | ------ | -------- | ----------- |
46+
| value | number | Yes | Value |
47+
48+
---
49+
50+
### `setOffset()`
51+
52+
```jsx
53+
setOffset(offset);
54+
```
55+
56+
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.
57+
58+
**Parameters:**
59+
60+
| Name | Type | Required | Description |
61+
| ------ | ------ | -------- | ------------ |
62+
| offset | number | Yes | Offset value |
63+
64+
---
65+
66+
### `flattenOffset()`
67+
68+
```jsx
69+
flattenOffset();
70+
```
71+
72+
Merges the offset value into the base value and resets the offset to zero. The final output of the value is unchanged.
73+
74+
---
75+
76+
### `extractOffset()`
77+
78+
```jsx
79+
extractOffset();
80+
```
81+
82+
Sets the offset value to the base value, and resets the base value to zero. The final output of the value is unchanged.
83+
84+
---
85+
86+
### `addListener()`
87+
88+
```jsx
89+
addListener(callback);
90+
```
91+
92+
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.
93+
94+
Returns a string that serves as an identifier for the listener.
95+
96+
**Parameters:**
97+
98+
| Name | Type | Required | Description |
99+
| -------- | -------- | -------- | ------------------------------------------------------------------------------------------- |
100+
| callback | function | Yes | The callback function which will receive an object with a `value` key set to the new value. |
101+
102+
---
103+
104+
### `removeListener()`
105+
106+
```jsx
107+
removeListener(id);
108+
```
109+
110+
Unregister a listener. The `id` param shall match the identifier previously returned by `addListener()`.
111+
112+
**Parameters:**
113+
114+
| Name | Type | Required | Description |
115+
| ---- | ------ | -------- | ---------------------------------- |
116+
| id | string | Yes | Id for the listener being removed. |
117+
118+
---
119+
120+
### `removeAllListeners()`
121+
122+
```jsx
123+
removeAllListeners();
124+
```
125+
126+
Remove all registered listeners.
127+
128+
---
129+
130+
### `stopAnimation()`
131+
132+
```jsx
133+
stopAnimation([callback]);
134+
```
135+
136+
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.
137+
138+
**Parameters:**
139+
140+
| Name | Type | Required | Description |
141+
| -------- | -------- | -------- | --------------------------------------------- |
142+
| callback | function | No | A function that will receive the final value. |
143+
144+
---
145+
146+
### `resetAnimation()`
147+
148+
```jsx
149+
resetAnimation([callback]);
150+
```
151+
152+
Stops any animation and resets the value to its original.
153+
154+
**Parameters:**
155+
156+
| Name | Type | Required | Description |
157+
| -------- | -------- | -------- | ------------------------------------------------ |
158+
| callback | function | No | A function that will receive the original value. |
159+
160+
---
161+
162+
### `interpolate()`
163+
164+
```jsx
165+
interpolate(config);
166+
```
167+
168+
Interpolates the value before updating the property, e.g. mapping 0-1 to 0-10.
169+
170+
See `AnimatedInterpolation.js`
171+
172+
**Parameters:**
173+
174+
| Name | Type | Required | Description |
175+
| ------ | ------ | -------- | ----------- |
176+
| config | object | Yes | See below. |
177+
178+
The `config` object is composed of the following keys:
179+
180+
- `inputRange`: an array of numbers
181+
- `outputRange`: an array of numbers or strings
182+
- `easing` (optional): a function that returns a number, given an input number
183+
- `extrapolate` (optional): a string such as 'extend', 'identity', or 'clamp'
184+
- `extrapolateLeft` (optional): a string such as 'extend', 'identity', or 'clamp'
185+
- `extrapolateRight` (optional): a string such as 'extend', 'identity', or 'clamp'
186+
187+
---
188+
189+
### `animate()`
190+
191+
```jsx
192+
animate(animation, callback);
193+
```
194+
195+
Typically only used internally, but could be used by a custom Animation class.
196+
197+
**Parameters:**
198+
199+
| Name | Type | Required | Description |
200+
| --------- | --------- | -------- | ------------------- |
201+
| animation | Animation | Yes | See `Animation.js`. |
202+
| callback | function | Yes | Callback function. |
203+
204+
---
205+
206+
### `stopTracking()`
207+
208+
```jsx
209+
stopTracking();
210+
```
211+
212+
Typically only used internally.
213+
214+
---
215+
216+
### `track()`
217+
218+
```jsx
219+
track(tracking);
220+
```
221+
222+
Typically only used internally.
223+
224+
**Parameters:**
225+
226+
| Name | Type | Required | Description |
227+
| -------- | ------------ | -------- | --------------------- |
228+
| tracking | AnimatedNode | Yes | See `AnimatedNode.js` |

0 commit comments

Comments
 (0)