Thin React hooks for `@peerbit/identity-supabase`.
@peerbit/identity-supabase-reactThin React hooks for @peerbit/identity-supabase.
This package intentionally does not include any profile/avatar logic.
``tsx
import { PeerProvider } from "@peerbit/react";
import { createSupabaseClient } from "@peerbit/identity-supabase";
import { useSupabasePeerbitKeypair } from "@peerbit/identity-supabase-react";
const supabase = createSupabaseClient(SUPABASE_URL, SUPABASE_ANON_KEY);
export function App() {
const { keypair, loading, error } = useSupabasePeerbitKeypair({ supabase });
if (loading) return null;
if (error) return
{String(error)}; return (
{/ ... /}
);
}
``