From 61c964130f506df7b0af3fa280fcd850dc50ffbc Mon Sep 17 00:00:00 2001 From: Hikmet Date: Mon, 10 Aug 2026 21:16:42 +0300 Subject: [PATCH] docs: record async form handler learning --- AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 2e27ac7..55c2e54 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,3 +5,7 @@ This version has breaking changes — APIs, conventions, and file structure may **Keep this block, including in commits.** It is part of the project's agent setup, maintained by `next dev` for every agent that works here. If it appears as an uncommitted change, that is intentional — commit it as-is. Do not remove it to clean up a diff; it will be regenerated. + +## Learnings + +- In async React form handlers, capture `event.currentTarget` before the first `await`; using it afterward can make a successful request appear to fail when the form is reset.