Open
Description
Summary
The "Display a form submission error without JavaScript" section on the form element docs page states the following, among other things:
Displaying a [...] error message [...] requires that:
- <form> be rendered by a Server Component
- [...]
- the useFormState Hook be used to display the error message
Then there's an example on how to do this. However, there are two concerns with the example:
- The provided example uses a client component, not a server component, so the
<form>
element is being rendered in a client component, breaking the first requirement - If we pretend that the client component is used instead of a server component for the demonstration purposes only, the component that renders the
<form>
element uses theuseFormState
hook, which is not allowed for server components.
Page
Details
No response