Skip to content

[Bug]: useActionData return wrong data after redirection from action #9333

@jrakotoharisoa

Description

@jrakotoharisoa

What version of React Router are you using?

6.4.1

Steps to Reproduce

Pull this repository: https://github.com/jrakotoharisoa/react-router-sandbox

  1. Submit form with empty value to trigger error from action
  2. Enter a value in input and submit form

Expected Behavior

On the redirecting page, action data should be null

Actual Behavior

Action data on the redirecting page correspond to old action data returned when the form on previous page was in error.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions