---
title: PlatformStateContext
source: https://docs.newrelic.com/docs/new-relic-solutions/build-nr-ui/sdk-component/platform-apis/PlatformStateContext
---

[React context](https://reactjs.org/docs/context.html#when-to-use-context) to access the platform URL state.

### Usage

```jsx
import { PlatformStateContext } from 'nr1'
```

### Examples

#### Basic

```jsx
<PlatformStateContext.Consumer>
  {(platformState) => <pre>{JSON.stringify(platformState, null, 4)}</pre>}
</PlatformStateContext.Consumer>
```

### Methods

### `PlatformStateContext.subscribe`
