Skip to content

[Bug]: shouldRevalidate missing FormData if action called by fetcher.submit returns (or throws) a redirect. #10176

@nicksrandall

Description

@nicksrandall

What version of React Router are you using?

v6.8.2

Steps to Reproduce

  • Create action that throws a redirect.
  • Send "POST" to that action using fether.submit
  • Notice that shouldRevalidate is called but it does not include the formData that was originally sent.

Expected Behavior

  • I would expect that I would still have access to the formData that caused the redirect.

Actual Behavior

  • formData and formMethod are both undefined when action throws redirect.

As a side note, useSubmit works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions