Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.devGet API keys

<MultisessionAppSupport />

Used in Multisession applications to ensure the proper UI state while switching users in Clerk multi-session applications

Overview

The <MultisessionAppSupport/> provides a wrapper for your React application that guarantees a full rerendering cycle everytime the current session and user changes.

Usage

Make sure you've followed the installation guide for Clerk React before running the snippets below.

The <MultisessionAppSupport/> should live under the <ClerkProvider/> and wrap your React application.

1
import { useEffect } from "react";
2
import { ClerkProvider, MultisessionAppSupport } from "@clerk/clerk-react";
3
4
function App() {
5
return (
6
<ClerkProvider frontendApi="clerk.[your-domain].com">
7
<MultisessionAppSupport>
8
<Page />
9
</ClerkProvider>
10
</ClerkProvider>
11
);
12
}
13
14
function Page() {
15
useEffect(() => {
16
// No need to check if the
17
// Clerk object exists.
18
document.title = "This page uses Clerk " +
19
document.window.Clerk.version;
20
}, []);
21
22
return (
23
<div>The content</div>
24
);
25
}

Props

This component accepts no props, apart from any child components.

NameTypeDescription
childrenJSX.Element

Pass any top level application component or components that operate in a Clerk multi-session mode.

Was this helpful?

Clerk © 2022