Your browser does not support the video tag. TL;DR 🌎 Live Demo: ssg-nextjs-cms-sanity.netlify.app 📑 Source Code: github.com/arnaudrenaud/ssg-nextjs-cms-sanity Is this for you? This guide is meant to help if:
you want a public, mostly read-only website (no user-supplied content) content is not supposed to change dozens of times per day, as each update will trigger a rebuild Advantages If the…
TL;DR ✅ Result:
a form that submits to a server-side action shared validation logic on both client and server browser-side form state management: loading, success, and error states 🛠️ Tech stack:
Next.js Server Actions next-safe-action Zod React Hook Form 📦 Code: https://github.com/arnaudrenaud/nextjs-forms-both-sides-validation
The problem Forms have been – and still are – a pain…
TL;DR Explore the code produced in this article:
https://github.com/arnaudrenaud/clean-architecture-typescript-prisma-nextjs
For step-by-step guidance, review the commit history.
What is the purpose of Clean Architecture? The Clean Architecture software design pattern, as defined by Robert C. Martin in this article, is one of a handful of patterns that propose a way to separate…
I taught the practice of web development to around 200 students in six years. Here are ways to improve on the mistakes and misconceptions I noticed most often.
TL;DR Use automatic code formatting Look for error messages Simplify your code until the bug goes away Solve only one problem at a time Split tasks and commits Give symbols a proper name Refrain from DRYing everything out Optimize…
Errors are painful for the developer and the user alike. Errors without a clear message even more. And what about silent errors that make debugging a pain?
TL;DR Do not blindly use try-catch blocks Uncaught errors end up in logs, making debugging easier If an error is not your fault, catch it (it is called an exception) If an error is the user’s fault, tell them clearly Goals The…