Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: <Form> elements do not work in error component #9720

Closed
charliematters opened this issue Dec 12, 2022 · 1 comment
Closed

[Bug]: <Form> elements do not work in error component #9720

charliematters opened this issue Dec 12, 2022 · 1 comment
Labels

Comments

@charliematters
Copy link

charliematters commented Dec 12, 2022

What version of React Router are you using?

6.4

Steps to Reproduce

https://stackblitz.com/edit/github-gkokwd-ogj8yk?file=src%2FApp.tsx

^^^ Failing example here. Replacing <Form> with <form> does at least render the page

Error in console begins with:

index.tsx:861 Uncaught TypeError: Cannot read properties of undefined (reading 'route')
    at useFormAction (index.tsx:861:15)
    at useSubmitImpl (index.tsx:799:23)
    at index.tsx:589:18

Expected Behavior

The form should load and allow submissions to the route's action

Actual Behavior

An exception is thrown which causes the whole app to disappear

@brophdawg11
Copy link
Contributor

Hey @charliematters - thanks for the reproduction! This was actually a bug that was just fixed in #9735 and is currently available in 6.6.0-pre.0. I confirmed fixes the provided reproduction, so I'm going to close this out.

6.6.0 is the release that will finish up the React Router-ing Remix work so it might be in prerelease a bit longer than normal as we ensure we've worked out any last kinks on the Remix side. So the stable may be after the holidays but we'll see how this week goes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants