How to Use Environment Variables in Next.js (Without Leaking Them to the Browser)
Learn how to use .env files in Next.js correctly. Understand NEXT_PUBLIC_, avoid common mistakes, and set variables in Vercel and Cloudflare.
8 articles
Learn how to use .env files in Next.js correctly. Understand NEXT_PUBLIC_, avoid common mistakes, and set variables in Vercel and Cloudflare.
CSS :has() is production-ready in every browser. Here are 8 real-world patterns: form states, sibling dimming, modal scroll-lock, and more.
Sequential awaits, await in forEach, missing Promise.all: these 5 async/await mistakes silently slow your JavaScript. Here's how to spot and fix each one.
Pages using ARIA average 41% more accessibility errors. Learn the correct ARIA patterns for React: icon buttons, modals, toasts, spinners, and tab panels.
React Fiber is the engine behind every React render. Learn how it works: render phase, commit phase, Lanes, and double buffering, explained with analogies.
30 Next.js interview questions with full answers: App Router, Server Components, use cache, PPR, Turbopack, and auth. Updated for Next.js 15 and 16.
Next.js 16 renamed middleware.ts to proxy.ts, and it's not just a name change. Here's what the runtime switch means and how to migrate a real auth-check file.
Getting a Mercor frontend engineer interview? Here's what the React and Next.js coding round actually tests, and how to prepare in a weekend.