Tailwind CSS with React and Next.js
Best practices for using Tailwind CSS in React and Next.js projects: component patterns, conditional classes, server components, and common pitfalls.
18 posts · page 1 of 1
Best practices for using Tailwind CSS in React and Next.js projects: component patterns, conditional classes, server components, and common pitfalls.
Compare React, Vue, and Svelte across performance, developer experience, ecosystem, and hiring. Find the right frontend framework for your next project.
Learn how to add smooth, native page transitions to your Astro site using the View Transitions API with practical examples and gotchas.
How Apollo Client's normalized cache works, why entity IDs matter, and the patterns for cache updates, refetches, and consistent UI after mutations.
Stop fighting !important. Learn how the CSS cascade, specificity, and the new @layer rule combine to give you predictable, maintainable styles.
Container queries let components style themselves based on their parent's size, not the viewport. Learn the syntax, the units, and when to use them.
Stop flipping a coin between Grid and Flexbox. Learn the mental model that picks the right layout tool every time, with practical CSS examples.
Learn how the CSS :has() pseudo-class enables true parent selectors, conditional styling, and sibling-aware rules. Includes a mental model, examples, pitfalls, and best practices for production use.
A practical tour of modern CSS color: oklch, color-mix, relative color syntax, and wide-gamut color spaces. Learn how to pick palettes that stay perceptually even and accessible across themes.
Native CSS nesting is here. Learn the syntax, the ampersand rules, how it compares to Sass, common gotchas with pseudo-classes and media queries, and how to adopt it without breaking older browsers.
Use CSS subgrid to align nested elements with their parent grid, perfect for card layouts, forms, and complex content where rows and columns must line up across components.
Choose the right HTML element for the job and your site becomes more accessible, more SEO-friendly, and easier to style. Practical patterns and pitfalls.
How Tailwind's JIT engine generates classes on demand, when arbitrary values are the right tool, and how to keep your design system tidy.
Compare the class-based, media-based, and variable-driven approaches to dark mode in Tailwind, with code and the trade-offs of each.
Build a design system on top of Tailwind that stays consistent as the app grows. Tokens, components, variants, and the cva pattern explained.
A pragmatic comparison of Tailwind CSS and Bootstrap covering philosophy, bundle size, customization, and the right use cases for each framework.
A practical deep dive into useState, useEffect, useMemo, useCallback, and useRef. Learn when to reach for each hook and the traps that ruin React code.
A practical roadmap to becoming a Frontend Developer. HTML, CSS, JavaScript deep, TypeScript, React and Next.js, accessibility, performance, and testing.