JoloJ
Convex Community2y ago
1 reply
Jolo

Has anyone an idea how to avoid this Flash when checking if `Authenticated` or `Unauthenticated`?

It could be more of a React thing.
My code is looking like this

import { ConvexAuthProvider } from '@convex-dev/auth/react';
import { Authenticated, ConvexReactClient, Unauthenticated } from 'convex/react';

export function App() {
  const convex = new ConvexReactClient(import.meta.env.PUBLIC_CONVEX_URL as string);

  return (
    <ConvexAuthProvider client={convex}>
      <Unauthenticated>
        <LoginForm />
      </Unauthenticated>
      <Authenticated>
        <div>My Content</div>
      </Authenticated>
    </ConvexAuthProvider>
  );
}
Was this page helpful?