'use client'; import { useState } from 'react'; import Image from "next/image"; export default function Home() { const [apiMessage, setApiMessage] = useState(''); const handleApiCall = async () => { const response = await fetch('/api/hello'); const data = await response.json(); setApiMessage(data.message); }; return (
Next.js logo
  1. Get started by editing{" "} src/app/page.tsx .
  2. Save and see your changes instantly.
{apiMessage && (

{apiMessage}

)}
Vercel logomark Deploy now Read our docs
); }