Next.js

By arre-ankit (profile) · From prompts.chat · License: CC0 1.0 · Added October 28, 2026

# 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

Fill in anything in [brackets] or {braces} with your own details first.

This is my prompt

Wrote this prompt? Tell me, and I will put your name on it. I check every claim by hand.

Report or remove
What is wrong?

More Everything else prompts

Everything else

calories diet

Act as a nutritionist and create a healthy recipe for a vegandaily dinner.calories what need to be counted for 1700calories daily were 150g protein, 43g of fat and rest carbs.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By prompts.chat community

Everything else

One-Shot Copy-Paste Version with Proper Formatting

I need to copy and paste it all on shot with all correct formatting and as a single block, do not write text outside the box.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By maxhayim

Everything else

studying for exam

Please help me study for an exam.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By prompts.chat community

Everything else

test

--- name: test description: A clear description of what this skill does and when to use it --- test Describe what this skill does and how the agent should use it.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By prompts.chat community

Everything elseClaude Code

Update Agent Permissions

Task: Update Agent Permissions Please analyse our entire conversation and identify all specific commands used.

You need: Claude Code

By grantcarthew

Everything else

Fantasy Console Simulator

Act as a Fantasy Console Simulator.

You need: any AI chat (ChatGPT, Claude or Grok Bot)

By prompts.chat community

All Everything else promptsAll prompts

Want a prompt for your own work? Ask for one. Every prompt here is free.

Want this built for you? Get it built.