I am building a reusable Card component that can render as an a tag, a button tag, or a custom Next.js Link based on an as prop. I am struggling to get the TypeScript typing correct so that standard attributes (like href for links, type for buttons) are auto-completed and typesafe. Can someone show me a clean way to achieve this?
I am building a reusable Card component that can render as an a tag, a button tag, or a custom Next.js Link based on an as prop. I am struggling to get the TypeScript typing correct so that standard attributes (like href for links, type for buttons) are auto-completed and typesafe. Can someone show me a clean way to achieve this?
We are thrilled to roll out our brand new discussion platform built from the ground up with Next.js, Laravel, and WebSockets. This forum is fully optimized for developers, featuring low latency, syntax-highlighted code blocks, accepted answers, markdown integration, and gamified reputation badges. Jump in, ask questions, and share what you are working on!
We are thrilled to roll out our brand new discussion platform built from the ground up with Next.js, Laravel, and WebSockets. This forum is fully optimized for developers, featuring low latency, syntax-highlighted code blocks, accepted answers, markdown integration, and gamified reputation badges. Jump in, ask questions, and share what you are working on!
We recently migrated one of our high-traffic content sites from Next.js Page Router (SSR) to Next.js 15 App Router using Server Components (RSC). After 3 weeks of running in production, I gathered some interesting insights regarding core web vitals, server-side memory leaks, and compilation sizes. Here is a breakdown of what improved and what got slightly worse.
We recently migrated one of our high-traffic content sites from Next.js Page Router (SSR) to Next.js 15 App Router using Server Components (RSC). After 3 weeks of running in production, I gathered some interesting insights regarding core web vitals, server-side memory leaks, and compilation sizes. Here is a breakdown of what improved and what got slightly worse.