docs: record async form handler learning

This commit is contained in:
2026-08-10 21:16:42 +03:00
parent 08ef798c13
commit 61c964130f
+4
View File
@@ -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. **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.
<!-- END:nextjs-agent-rules --> <!-- END:nextjs-agent-rules -->
## 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.