diff --git a/docs/appstate.md b/docs/appstate.md index f264fdc7c7f..579a7f30487 100644 --- a/docs/appstate.md +++ b/docs/appstate.md @@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do ## 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. +To see the current state, you can check `AppState.currentState`, which will be kept up-to-date. + +:::info +If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side. +::: ```SnackPlayer name=AppState%20Example import React, {useRef, useState, useEffect} from 'react'; @@ -70,7 +74,7 @@ const styles = StyleSheet.create({ export default AppStateExample; ``` -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. +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. --- diff --git a/website/versioned_docs/version-0.77/appstate.md b/website/versioned_docs/version-0.77/appstate.md index f264fdc7c7f..579a7f30487 100644 --- a/website/versioned_docs/version-0.77/appstate.md +++ b/website/versioned_docs/version-0.77/appstate.md @@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do ## 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. +To see the current state, you can check `AppState.currentState`, which will be kept up-to-date. + +:::info +If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side. +::: ```SnackPlayer name=AppState%20Example import React, {useRef, useState, useEffect} from 'react'; @@ -70,7 +74,7 @@ const styles = StyleSheet.create({ export default AppStateExample; ``` -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. +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. --- diff --git a/website/versioned_docs/version-0.78/appstate.md b/website/versioned_docs/version-0.78/appstate.md index f264fdc7c7f..579a7f30487 100644 --- a/website/versioned_docs/version-0.78/appstate.md +++ b/website/versioned_docs/version-0.78/appstate.md @@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do ## 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. +To see the current state, you can check `AppState.currentState`, which will be kept up-to-date. + +:::info +If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side. +::: ```SnackPlayer name=AppState%20Example import React, {useRef, useState, useEffect} from 'react'; @@ -70,7 +74,7 @@ const styles = StyleSheet.create({ export default AppStateExample; ``` -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. +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. --- diff --git a/website/versioned_docs/version-0.79/appstate.md b/website/versioned_docs/version-0.79/appstate.md index f264fdc7c7f..579a7f30487 100644 --- a/website/versioned_docs/version-0.79/appstate.md +++ b/website/versioned_docs/version-0.79/appstate.md @@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do ## 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. +To see the current state, you can check `AppState.currentState`, which will be kept up-to-date. + +:::info +If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side. +::: ```SnackPlayer name=AppState%20Example import React, {useRef, useState, useEffect} from 'react'; @@ -70,7 +74,7 @@ const styles = StyleSheet.create({ export default AppStateExample; ``` -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. +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. --- diff --git a/website/versioned_docs/version-0.80/appstate.md b/website/versioned_docs/version-0.80/appstate.md index f264fdc7c7f..579a7f30487 100644 --- a/website/versioned_docs/version-0.80/appstate.md +++ b/website/versioned_docs/version-0.80/appstate.md @@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do ## 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. +To see the current state, you can check `AppState.currentState`, which will be kept up-to-date. + +:::info +If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side. +::: ```SnackPlayer name=AppState%20Example import React, {useRef, useState, useEffect} from 'react'; @@ -70,7 +74,7 @@ const styles = StyleSheet.create({ export default AppStateExample; ``` -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. +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. --- diff --git a/website/versioned_docs/version-0.81/appstate.md b/website/versioned_docs/version-0.81/appstate.md index f264fdc7c7f..579a7f30487 100644 --- a/website/versioned_docs/version-0.81/appstate.md +++ b/website/versioned_docs/version-0.81/appstate.md @@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do ## 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. +To see the current state, you can check `AppState.currentState`, which will be kept up-to-date. + +:::info +If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side. +::: ```SnackPlayer name=AppState%20Example import React, {useRef, useState, useEffect} from 'react'; @@ -70,7 +74,7 @@ const styles = StyleSheet.create({ export default AppStateExample; ``` -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. +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. --- diff --git a/website/versioned_docs/version-0.82/appstate.md b/website/versioned_docs/version-0.82/appstate.md index f264fdc7c7f..579a7f30487 100644 --- a/website/versioned_docs/version-0.82/appstate.md +++ b/website/versioned_docs/version-0.82/appstate.md @@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do ## 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. +To see the current state, you can check `AppState.currentState`, which will be kept up-to-date. + +:::info +If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side. +::: ```SnackPlayer name=AppState%20Example import React, {useRef, useState, useEffect} from 'react'; @@ -70,7 +74,7 @@ const styles = StyleSheet.create({ export default AppStateExample; ``` -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. +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. --- diff --git a/website/versioned_docs/version-0.83/appstate.md b/website/versioned_docs/version-0.83/appstate.md index f264fdc7c7f..579a7f30487 100644 --- a/website/versioned_docs/version-0.83/appstate.md +++ b/website/versioned_docs/version-0.83/appstate.md @@ -20,7 +20,11 @@ For more information, see [Apple's documentation](https://developer.apple.com/do ## 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. +To see the current state, you can check `AppState.currentState`, which will be kept up-to-date. + +:::info +If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side. +::: ```SnackPlayer name=AppState%20Example import React, {useRef, useState, useEffect} from 'react'; @@ -70,7 +74,7 @@ const styles = StyleSheet.create({ export default AppStateExample; ``` -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. +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. ---