next.js
887d7461 - Fix accessing headers in progressively enhanced form actions (#74196)

Commit
1 year ago
Fix accessing headers in progressively enhanced form actions (#74196) When scoping the `requestStore` to dynamic renders in #72312, we missed the case when a server action is invoked before hydration is complete. This leads to an error when a server action tries to read headers, cookies, or anything else that requires the presence of the `requestStore`. This fixes that for both the Node.js and Edge runtimes. It also appears that progressively enhanced form actions did not work at all before in the Edge runtime due to a missing `await` of `decodeFormState`. fixes #73992 closes NAR-55
Author
Parents
Loading