# Superwall

The shared instance of Superwall that provides access to all SDK features.

> **Warning**

**Deprecated SDK**We strongly recommend migrating to the new [Superwall Expo SDK](/docs/expo), see our [migration guide](/docs/expo/guides/migrating-react-native) for details.



> **Note**

You must call [`configure()`](/docs/react-native/sdk-reference/configure) before accessing `Superwall.shared`, otherwise your app may crash or behave unexpectedly.



Purpose [#purpose]

Provides access to the configured Superwall instance after calling [`configure()`](/docs/react-native/sdk-reference/configure).

Signature [#signature]

```typescript
static get shared(): Superwall
```

Parameters [#parameters]

This is a static property with no parameters.

Returns / State [#returns--state]

Returns the shared `Superwall` instance that was configured via [`configure()`](/docs/react-native/sdk-reference/configure).

Usage [#usage]

Configure first (typically in your app's entry point):

```typescript
import Superwall from "@superwall/react-native-superwall"

await Superwall.configure({
  apiKey: "pk_your_api_key"
})
```

Then access throughout your app:

```typescript
Superwall.shared.register({
  placement: "feature_access",
  feature: () => {
    // Feature code here
  }
})
```

Set user identity and attributes:

```typescript
await Superwall.shared.identify({
  userId: "user123"
})

await Superwall.shared.setUserAttributes({
  plan: "premium",
  signUpDate: new Date()
})
```

Reset the user:

```typescript
await Superwall.shared.reset()
```

> **Note**

Avoid calling `Superwall.shared.reset()` repeatedly. Resetting rotates the anonymous user ID, clears local paywall assignments, and requires the SDK to re-download configuration state. Only trigger a reset when a user explicitly logs out or you intentionally need to forget their identity.



Set delegate:

```typescript
import { SuperwallDelegate } from "@superwall/react-native-superwall"

class MyDelegate extends SuperwallDelegate {
  subscriptionStatusDidChange(from, to) {
    console.log(`Subscription status changed from ${from} to ${to}`)
  }
}

await Superwall.shared.setDelegate(new MyDelegate())
```

Main Methods [#main-methods]

* [`register()`](/docs/react-native/sdk-reference/register) - Register a placement to trigger paywalls
* [`identify()`](/docs/react-native/sdk-reference/identify) - Identify a user
* [`getUserAttributes()`](/docs/react-native/sdk-reference/getUserAttributes) - Get user attributes
* [`setUserAttributes()`](/docs/react-native/sdk-reference/setUserAttributes) - Set user attributes
* [`handleDeepLink()`](/docs/react-native/sdk-reference/handleDeepLink) - Handle deep links
* [`getSubscriptionStatus()`](/docs/react-native/sdk-reference/subscriptionStatus) - Get subscription status
* [`setSubscriptionStatus()`](/docs/react-native/sdk-reference/subscriptionStatus) - Set subscription status