A proof of concept for e-commerce systems using a NextJS seed ready to be deployed with Vercel.
A proof of concept using a NextJS seed ready to be deployed with Vercel.
Develop running npm run dev
- http://localhost:3000
Build npm run build
Deploy vercel --prod
https://next-store-pi.vercel.app
Using SWR:
import useSWR from "swr";
function Profile() {
const { data, error } = useSWR("/api/user", fetcher);
if (error) return <div>failed to load</div>;
if (!data) return <div>loading...</div>;
return <div>hello {data.name}!</div>;
}