Sarah Chen·Asked 6 months ago
How to centre a div?
I've been trying to centre a div both horizontally and vertically for hours. I've tried margin: auto, text-align: center, and various other approaches but nothing seems to work consistently. What's the most reliable modern approach?
142 votes12 answers15420 views
Marcus Johnson·Asked 4 months ago
How to Ensure Unique User Profile with ON CONFLICT in PostgreSQL Using Drizzle ORM?
I'm building a user profile system where users can only have one profile. When they try to create a second profile, I want to update the existing one instead. How do I implement this upsert pattern with Drizzle ORM?
89 votes5 answers3241 views
Emily Rodriguez·Asked 5 months ago
What are the benefits and trade-offs of using Server-Side Rendering (SSR) in Next.js?
I'm starting a new Next.js project and trying to decide between SSR, SSG, and client-side rendering. What are the real-world trade-offs I should consider? When does SSR actually make sense?
67 votes8 answers4892 views
Alex Kim·Asked 4 months ago
Node.js res.json() and res.send(), not working but still able to change status code
I'm building an Express API and running into a strange issue. My res.json() and res.send() calls don't seem to send any response body, but the status code changes work fine. What could be causing this?
45 votes3 answers1876 views
Jordan Taylor·Asked 4 months ago
ReactJs or NextJs for beginners i ask for advice
I'm new to web development and want to learn React. Should I start with plain React or jump straight into Next.js? I've heard Next.js is more opinionated but provides better structure. What do experienced developers recommend?
38 votes15 answers6234 views
Priya Patel·Asked 4 months ago
How to set up Tailwind CSS v4 with Next.js?
I'm trying to set up Tailwind CSS v4 in my Next.js project but the configuration seems different from v3. The @tailwind directives aren't working. What's the correct way to configure Tailwind v4 with the new @import syntax?
23 votes4 answers1245 views
David Lee·Asked 4 months ago
TypeScript generics explained with examples
I understand basic TypeScript but generics confuse me. Can someone explain with practical examples when and why I'd use generics? I've seen code like <T extends Something> and have no idea what it means.
19 votes6 answers2103 views