Semantic-UI-React
Semantic-UI-React copied to clipboard
React 19 form and useActionState support
Feature Request
Problem description
I'm updating an existing app using react-hook-form to React 19 and looking at the new form handling features.
Here is the example in the React docs: https://react.dev/reference/react/useActionState#using-information-returned-by-a-form-action.
Because action is not supported on SUIR Form, the I'm using the following workaround:
const [error, asyncSubmit, is_pending] = useActionState<void | Error>(submitLogin, null)
return (
<form action={asyncSubmit}>
<Form as={Segment}>
<Form.Input
label="Email"
name="email"
/>
...
Proposed solution
Perhaps it's as simple as allowing action on Form and passing down to the rendered form element, or perhaps this warrants looking at "in the round", I'm not sure.