# App State

Will bootstrap the VisualProvider of the [digital-reactnative-visual](https://dormakaba-digital.gitbook.io/reactnative-visual/misc/visualprovider) and give you information about your device.

## Code sample

```jsx
import { DokaApp, AppState } from '@dormakaba/digital-reactnative-client';

<DokaApp>
  <AppState>
    {({ offline, deviceInfo }) => (
      <View>
        <Text>{`is offline: ${offline}`}</Text>
        <Text>{JSON.stringify(deviceInfo)}</Text>
      </View>
    )}
  </AppState>
</DokaApp>
```

{% hint style="info" %}
Use the `DokaApp` component once as a wrapper for you app.
{% endhint %}

deviceInfo will contain following information:

```jsx
deviceInfo: {
  isTablet,
  width,
  height,
  isPortrait,
  isLandscape
}
```
