Skip to content

Commit aad4d2e

Browse files
authored
[docs] Remove outdated bridge and null state references from AppState docs (facebook#4985)
1 parent c504050 commit aad4d2e

8 files changed

Lines changed: 48 additions & 16 deletions

File tree

docs/appstate.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do
2020

2121
## Basic Usage
2222

23-
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.
23+
To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
24+
25+
:::info
26+
If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side.
27+
:::
2428

2529
```SnackPlayer name=AppState%20Example
2630
import React, {useRef, useState, useEffect} from 'react';
@@ -70,7 +74,7 @@ const styles = StyleSheet.create({
7074
export default AppStateExample;
7175
```
7276

73-
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
77+
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
7478

7579
---
7680

website/versioned_docs/version-0.77/appstate.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do
2020

2121
## Basic Usage
2222

23-
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.
23+
To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
24+
25+
:::info
26+
If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side.
27+
:::
2428

2529
```SnackPlayer name=AppState%20Example
2630
import React, {useRef, useState, useEffect} from 'react';
@@ -70,7 +74,7 @@ const styles = StyleSheet.create({
7074
export default AppStateExample;
7175
```
7276

73-
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
77+
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
7478

7579
---
7680

website/versioned_docs/version-0.78/appstate.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do
2020

2121
## Basic Usage
2222

23-
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.
23+
To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
24+
25+
:::info
26+
If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side.
27+
:::
2428

2529
```SnackPlayer name=AppState%20Example
2630
import React, {useRef, useState, useEffect} from 'react';
@@ -70,7 +74,7 @@ const styles = StyleSheet.create({
7074
export default AppStateExample;
7175
```
7276

73-
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
77+
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
7478

7579
---
7680

website/versioned_docs/version-0.79/appstate.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do
2020

2121
## Basic Usage
2222

23-
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.
23+
To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
24+
25+
:::info
26+
If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side.
27+
:::
2428

2529
```SnackPlayer name=AppState%20Example
2630
import React, {useRef, useState, useEffect} from 'react';
@@ -70,7 +74,7 @@ const styles = StyleSheet.create({
7074
export default AppStateExample;
7175
```
7276

73-
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
77+
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
7478

7579
---
7680

website/versioned_docs/version-0.80/appstate.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do
2020

2121
## Basic Usage
2222

23-
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.
23+
To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
24+
25+
:::info
26+
If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side.
27+
:::
2428

2529
```SnackPlayer name=AppState%20Example
2630
import React, {useRef, useState, useEffect} from 'react';
@@ -70,7 +74,7 @@ const styles = StyleSheet.create({
7074
export default AppStateExample;
7175
```
7276

73-
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
77+
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
7478

7579
---
7680

website/versioned_docs/version-0.81/appstate.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do
2020

2121
## Basic Usage
2222

23-
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.
23+
To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
24+
25+
:::info
26+
If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side.
27+
:::
2428

2529
```SnackPlayer name=AppState%20Example
2630
import React, {useRef, useState, useEffect} from 'react';
@@ -70,7 +74,7 @@ const styles = StyleSheet.create({
7074
export default AppStateExample;
7175
```
7276

73-
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
77+
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
7478

7579
---
7680

website/versioned_docs/version-0.82/appstate.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do
2020

2121
## Basic Usage
2222

23-
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.
23+
To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
24+
25+
:::info
26+
If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side.
27+
:::
2428

2529
```SnackPlayer name=AppState%20Example
2630
import React, {useRef, useState, useEffect} from 'react';
@@ -70,7 +74,7 @@ const styles = StyleSheet.create({
7074
export default AppStateExample;
7175
```
7276

73-
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
77+
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
7478

7579
---
7680

website/versioned_docs/version-0.83/appstate.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do
2020

2121
## Basic Usage
2222

23-
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.
23+
To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
24+
25+
:::info
26+
If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side.
27+
:::
2428

2529
```SnackPlayer name=AppState%20Example
2630
import React, {useRef, useState, useEffect} from 'react';
@@ -70,7 +74,7 @@ const styles = StyleSheet.create({
7074
export default AppStateExample;
7175
```
7276

73-
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
77+
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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
7478

7579
---
7680

0 commit comments

Comments
 (0)