> ## Documentation Index
> Fetch the complete documentation index at: https://dev.moonpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <MoonPayConnectionReset />

> Headless reset frame. The declarative alternative to client.resetConnection().

`<MoonPayConnectionReset>` is a headless component (renders nothing visible)
that clears the customer's MoonPay connection for this partner. It is the
declarative alternative to
[`client.resetConnection()`](/platform/sdk-reference/react-native/reset-connection).

Mount this component after clearing your own local auth state to signal to
MoonPay that the customer has signed out. Unmount it after you receive the
`"complete"` event (or on error). The reset completes or times out within 5
seconds.

```tsx SignOutScreen.tsx theme={null}
import React from "react";
import {
  MoonPayConnectionReset,
  type ConnectionResetEvent,
} from "@moonpay/platform-sdk-react-native";

export function SignOutScreen({ onDone }: { onDone: () => void }) {
  const [resetting, setResetting] = React.useState(true);

  const handleEvent = (event: ConnectionResetEvent) => {
    if (event.kind === "complete") {
      setResetting(false);
      onDone();
    }
    if (event.kind === "error") {
      console.error(event.payload.message);
      setResetting(false);
      onDone();
    }
  };

  return <>{resetting && <MoonPayConnectionReset onEvent={handleEvent} />}</>;
}
```

***

## Props

| Prop      | Type                                    | Required | Description                                                                               |
| --------- | --------------------------------------- | -------- | ----------------------------------------------------------------------------------------- |
| `onEvent` | `(event: ConnectionResetEvent) => void` |          | Callback for reset lifecycle events. See [`ConnectionResetEvent`](#connectionresetevent). |

This component renders nothing visible (0×0). It has no `style` prop.

### `ConnectionResetEvent`

| kind         | Payload               | When you receive it                                  |
| ------------ | --------------------- | ---------------------------------------------------- |
| `"complete"` | —                     | The connection was successfully reset.               |
| `"error"`    | `{ message: string }` | The reset failed or timed out. Unmount and continue. |
