"use client";
import { useConvexAuth, useMutation, useQuery } from "convex/react";
import { api } from "../convex/_generated/api";
import Link from "next/link";
import { useAuthActions } from "@convex-dev/auth/react";
import { useRouter } from "next/navigation";
export default function Home() {
return (
<>
Convex + Next.js + Convex Auth
loading... (consider a loading skeleton)
Welcome {viewer ?? "Anonymous"}!
Click the button below and open this page in another window - this data is persisted in the Convex cloud database!
Numbers:{" "} {numbers?.length === 0 ? "Click the button!" : (numbers?.join(", ") ?? "...")}
Edit{" "}
convex/myFunctions.ts
{" "}
to change your backend
Edit{" "}
app/page.tsx
{" "}
to change your frontend
See the{" "} /server route {" "} for an example of loading data in a server component
Useful resources:
{description}