Skip to main content
Docs

<SignedOut>

The <SignedOut> component offers authentication checks as a cross-cutting concern. Any child nodes wrapped by a <SignedOut> component will be rendered only if there's no User signed in to your application.

Properties

  • Name
    treatPendingAsSignedOut?
    Description
app.tsx
import { Routes, Route } from 'react-router'
import { ClerkProvider, SignedOut } from '@clerk/react-router'

function App() {
  return (
    <ClerkProvider publishableKey={`YOUR_PUBLISHABLE_KEY`}>
      <Routes>
        <Route path="/" element={<p>This page is publicly accessible.</p>} />
        <Route
          path="/public"
          element={
            <SignedOut>
              <p>You are signed out.</p>
            </SignedOut>
          }
        />
      </Routes>
    </ClerkProvider>
  )
}

Feedback

What did you think of this content?

Last updated on