A proof of concept using a NextJS seed ready to be deployed with Vercel.
- Lazy Image Loading x2
- CSS Purged
- Green on Lighthouse
- Nextjs
- PurgeCSS
- TailwindCSS
- PostCSS
- Allows nesting and imports.
-
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>;
}
- NextJS with Prismic https://github.com/vercel/next.js/tree/canary/examples/cms-prismic
- Data fetching with SWR
- Nextjs Documentation
- Incremental Static Generation https://static-tweet.now.sh/