Skip to content

useFormStatus only works from within the scope of the form it relates to #27980

Closed
@kylemh

Description

@kylemh

As the docs stipulate [here]:

The useFormStatus Hook only returns status information for a parent

and not for any rendered in the same component calling the Hook, or child components.
Instead call useFormStatus from inside a component that is located inside .

I understand this is limited as a pitfall, but I also think it's a pretty big limitation. It's possible to render a form's submit button outside of the scope of the form... anywhere on a page even... with the form attribute. I wanted to suggest that we should be offered the same affordances with this API, otherwise we are forced to render our markup differently to use React to the fullest extent.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions