---
title: "@supertokens-plugins/profile-base-react"
description: "Public root exports for @supertokens-plugins/profile-base-react 0.1.0."
---

**Package version:** `0.1.0`

**Plugin protocol version (`PLUGIN_VERSION`):** `0.0.1`

The protocol version is an internal plugin compatibility constant. It is not the npm package version.

Generated from the packed release's root declaration, `./dist/index.d.ts`. Only exports reachable from that root are
listed. See the [immutable release source](https://github.com/supertokens/supertokens-plugins/blob/%40supertokens-plugins%2Fprofile-base-react%400.1.0/packages/profile-base-react/src/index.ts).

## Public root exports

| Export | Kind |
| --- | --- |
| `default` | Constant |
| `init` | Constant |
| `PLUGIN_ID` | Constant |
| `PLUGIN_VERSION` | Constant |
| `usePluginContext` | Constant |
| `UserProfileWrapper` | Constant |

## `default`

Published from the emitted `_default` declaration.

Root export:

```ts check=false reason="Generated API signature"
export default _default;
```

Resolved declaration:

```ts check=false reason="Generated API signature"
declare const _default: {
    init: (config?: (import('./types').SuperTokensPluginProfileConfig & {
        override?: ((oI: undefined) => undefined) | undefined;
    }) | undefined) => import('supertokens-auth-react').SuperTokensPlugin;
    PLUGIN_ID: string;
    UserProfileWrapper: () => import("react/jsx-runtime").JSX.Element;
    usePluginContext: () => {
        pluginConfig: import('./types').SuperTokensPluginProfileConfig;
        getSections: () => import('./types').SuperTokensPluginProfileSection[];
        registerSection: import('./types').RegisterSection;
        getOnLoadHandlers: () => (() => Promise<void>)[];
        t: (key: import('./types').TranslationKeys, replacements?: Record<string, string>) => string;
    };
};
```

## `init`

Root export:

```ts check=false reason="Generated API signature"
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { UserProfileWrapper } from './user-profile-wrapper';
export { init, PLUGIN_ID, PLUGIN_VERSION, UserProfileWrapper, usePluginContext };
```

Resolved declaration:

```ts check=false reason="Generated API signature"
import { RegisterSection, SuperTokensPluginProfileConfig, SuperTokensPluginProfileSection, TranslationKeys } from './types';
import { SuperTokensPlugin } from 'supertokens-auth-react';
export declare const init: (config?: (SuperTokensPluginProfileConfig & {
    override?: ((oI: undefined) => undefined) | undefined;
}) | undefined) => SuperTokensPlugin;
```

## `PLUGIN_ID`

Root export:

```ts check=false reason="Generated API signature"
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { UserProfileWrapper } from './user-profile-wrapper';
export { init, PLUGIN_ID, PLUGIN_VERSION, UserProfileWrapper, usePluginContext };
```

Resolved declaration:

```ts check=false reason="Generated API signature"
export declare const PLUGIN_ID = "supertokens-plugin-profile-base";
```

## `PLUGIN_VERSION`

Root export:

```ts check=false reason="Generated API signature"
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { UserProfileWrapper } from './user-profile-wrapper';
export { init, PLUGIN_ID, PLUGIN_VERSION, UserProfileWrapper, usePluginContext };
```

Resolved declaration:

```ts check=false reason="Generated API signature"
export declare const PLUGIN_VERSION = "0.0.1";
```

## `usePluginContext`

Root export:

```ts check=false reason="Generated API signature"
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { UserProfileWrapper } from './user-profile-wrapper';
export { init, PLUGIN_ID, PLUGIN_VERSION, UserProfileWrapper, usePluginContext };
```

Resolved declaration:

```ts check=false reason="Generated API signature"
import { RegisterSection, SuperTokensPluginProfileConfig, SuperTokensPluginProfileSection, TranslationKeys } from './types';
declare const usePluginContext: () => {
    pluginConfig: SuperTokensPluginProfileConfig;
    getSections: () => SuperTokensPluginProfileSection[];
    registerSection: RegisterSection;
    getOnLoadHandlers: () => (() => Promise<void>)[];
    t: (key: TranslationKeys, replacements?: Record<string, string>) => string;
};
```

## `UserProfileWrapper`

Root export:

```ts check=false reason="Generated API signature"
import { init, usePluginContext } from './plugin';
import { PLUGIN_ID, PLUGIN_VERSION } from './constants';
import { UserProfileWrapper } from './user-profile-wrapper';
export { init, PLUGIN_ID, PLUGIN_VERSION, UserProfileWrapper, usePluginContext };
```

Resolved declaration:

```ts check=false reason="Generated API signature"
export declare const UserProfileWrapper: () => import("react/jsx-runtime").JSX.Element;
```

## Required signature types

These declarations are not additional package-root exports. They are included because the public signatures above depend on them.

### `defaultTranslations`

```ts check=false reason="Generated API signature"
export declare const defaultTranslations: {
    readonly en: {
        readonly PL_PB_USER_PROFILE: "User Profile";
    };
};
```

### `RegisterSection`

```ts check=false reason="Generated API signature"
export type RegisterSection = (sectionBuilder: () => Promise<Section | Section[]>) => void;
```

### `Section`

```ts check=false reason="Generated API signature"
export type Section = Omit<SuperTokensPluginProfileSection, "order"> & {
    order?: number;
};
```

### `SuperTokensPluginProfileConfig`

```ts check=false reason="Generated API signature"
export type SuperTokensPluginProfileConfig = {
    profilePagePath?: string;
    sections?: SuperTokensPluginProfileSection[];
};
```

### `SuperTokensPluginProfileSection`

```ts check=false reason="Generated API signature"
import { default as React } from 'react';
export type SuperTokensPluginProfileSection = {
    id: string;
    title: string;
    order: number;
    icon?: () => React.JSX.Element;
    component: () => React.JSX.Element;
};
```

### `TranslationKeys`

```ts check=false reason="Generated API signature"
import { defaultTranslations } from './translations';
export type TranslationKeys = keyof (typeof defaultTranslations)["en"];
```
