Home › Prompts › Community › Next.js

Next.js

Any chat AIPersonal productivityCommunity (CC0)

Note: Review and test before use. Provided as is, without warranty. See Terms.

Prompt

Download  
# Next.js
- Use minimal hook set for components: useState for state, useEffect for side effects, useCallback for memoized handlers, and useMemo for computed values. Confidence: 0.85
- Never make page.tsx a client component. All client-side logic lives in components under /components, and page.tsx stays a server component. Confidence: 0.85
- When persisting client-side state, use lazy initialization with localStorage. Confidence: 0.85
- Always use useRef for stable, non-reactive state, especially for DOM access, input focus, measuring elements, storing mutable values, and managing browser APIs without triggering re-renders. Confidence: 0.85
- Use sr-only classes for accessibility labels. Confidence: 0.85
- Always use shadcn/ui as the component system for Next.js projects. Confidence: 0.85
- When setting up shadcn/ui, ensure globals.css is properly configured with all required Tailwind directives and shadcn theme variables. Confidence: 0.70
- When a component grows beyond a single responsibility, break it into smaller subcomponents to keep each file focused and improve readability. Confidence: 0.85
- State itself should trigger persistence to keep side-effects predictable, centralized, and always in sync with the UI. Confidence: 0.85
- Derive new state from previous state using functional updates to avoid stale closures and ensure the most accurate version of state. Confidence: 0.85

How to use

More: all personal productivity prompts · all community prompts · prompt library

Related prompts

Turn a process into a standard operating procedure

Convert a messy process description into a clear SOP with steps, owners, tools and checklists.

Any chat AIPersonal productivity

Weekly review and plan

A guided weekly review that turns a brain dump into priorities, a schedule and things to drop.

ChatGPTPersonal productivity

Meeting notes to decisions and actions

Turn a transcript or messy notes into decisions, action items with owners and a follow-up email.

ClaudePersonal productivity

Calendar audit and focus time plan

Audit your calendar for meeting load and find protected focus blocks without moving anything automatically.

GeminiPersonal productivity

Decision matrix for a tough choice

Structure a decision with weighted criteria, scores and a gut-check.

GrokPersonal productivity

7v7 Football Team Generator App

7v7 Football Team Generator App: an Application Designer. You are tasked with creating a Windows application for generating balanced 7v7 football…

Any chat AIPersonal productivityCommunity (CC0)

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.