react-useeffect
Installation
SKILL.md
LLM reference: Fetch llms.txt for the React documentation index and latest API. Key page for this skill: You Might Not Need an Effect.
useEffect — naming, scope, and when to skip
Effects are an escape hatch from React. They let you synchronize with external systems. If there is no external system involved, you usually should not use an Effect.
Name every useEffect (strong recommendation)
Always pass a named function expression to useEffect, not an anonymous arrow. Treat this as the default style for new and edited code.
// Avoid for useEffect (anonymous — hard to skim and debug)
useEffect(() => {
document.title = `${count} items`
}, [count])