diff --git a/docs/appstate.md b/docs/appstate.md
index cc68ba5cc05..a0ec25ff9bd 100644
--- a/docs/appstate.md
+++ b/docs/appstate.md
@@ -9,17 +9,19 @@ AppState is frequently used to determine the intent and proper behavior when han
### App States
-- `active` - The app is running in the foreground
+- `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`, including temporary system activities such
+ -
Android
on another `Activity`, including temporary system activities such
as autofill credential pickers (even if launched by your app or the system)
-- [iOS] `inactive` - This is a state that occurs when transitioning between foreground & background, and during periods of inactivity such as entering the multitasking view, opening the Notification Center or in the event of an incoming call.
+- iOS
`inactive` - This is a state that occurs when transitioning between foreground/background, and during periods of inactivity such as entering the multitasking view, opening the Notification Center or in the event of an incoming call.
+- iOS
`extension` - The app is running in an extension context.
+- iOS
`unknown` - The current app state is not yet available.
-For more information, see [Apple's documentation](https://developer.apple.com/documentation/uikit/app_and_scenes/managing_your_app_s_life_cycle)
+For more information, see [Apple documentation](https://developer.apple.com/documentation/uikit/managing-your-app-s-life-cycle) and [Android documentation](https://developer.android.com/guide/components/activities/activity-lifecycle).
-## Basic Usage
+## Usage
To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
@@ -77,6 +79,23 @@ 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. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
+### Hook
+
+The `useAppState` hook returns the current app state and subscribes to state changes. When the state changes, the component that calls this hook re-renders.
+
+```tsx title="useAppState Hook Example"
+import {useAppState, Text} from 'react-native';
+
+const AppStateHookExample = () => {
+ const appState = useAppState();
+ return Current state is: {appState};
+};
+
+export default AppStateHookExample;
+```
+
+The hook returns one of the [app state values](#app-states). It returns `unknown` until `AppState` reports a recognized state.
+
---
# Reference
@@ -120,3 +139,9 @@ Sets up a function that will be called whenever the specified event type on AppS
```tsx
static currentState: AppStateStatus;
```
+
+### `isAvailable`
+
+```tsx
+static isAvailable: boolean;
+```
diff --git a/website/src/css/customTheme.scss b/website/src/css/customTheme.scss
index 2719e210f62..095c19bae9b 100644
--- a/website/src/css/customTheme.scss
+++ b/website/src/css/customTheme.scss
@@ -2130,6 +2130,14 @@ td .label {
}
}
+ul,
+ol {
+ .label {
+ padding: 0 8px;
+ line-height: 20px;
+ }
+}
+
/*
Mark pages as "new" using href attribute:
- to show badge in all versions use "PAGEID"