From 4e62b048bd771c89f06c283e4ab2d49316cdd8a7 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Fri, 8 May 2026 14:59:00 +0800 Subject: [PATCH] update --- .agents/skills/how-to-write-component/SKILL.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.agents/skills/how-to-write-component/SKILL.md b/.agents/skills/how-to-write-component/SKILL.md index 005fd18070..6eff0f6b6d 100644 --- a/.agents/skills/how-to-write-component/SKILL.md +++ b/.agents/skills/how-to-write-component/SKILL.md @@ -34,6 +34,10 @@ Follow existing project patterns first. Use these rules to resolve unclear compo - Prefer `Link` for normal navigation. Use router APIs only for command-flow side effects such as mutation success, guarded redirects, or form submission. +## Effects + +- Do not use `useEffect` directly in components. If an effect is genuinely unavoidable, encapsulate it in a purpose-built hook so the component consumes a declarative API instead of managing the effect inline. + ## Performance - Avoid `memo`, `useMemo`, and `useCallback` unless there is a clear performance reason.