-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add future.v2_normalizeFormMethod flag #5815
Conversation
🦋 Changeset detectedLatest commit: bb11865 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
f0f18d9
to
e286bde
Compare
e286bde
to
7626db0
Compare
Cherry-picked the new future flags docs from |
🤖 Hello there, We just published version Thanks! |
Note: CI will fail until we point this to an RR experimental/prerelease version with these changes
Add a future flag to normalize/align
useNavigation().formMethod
. We want our API to behave likefetch()
- it can accept lowercase or uppercase, but exposes the method back to you as a normalized uppercase method:So this means that both
<Form method="post">
and<Form method="POST">
should result inuseNavigation().formMethod === "POST"
.We inadvertently shipped lowercase
useNavigation
values in RR 6.4, and only noticed the inconsistency when we went to deprecateuseTransition
in Remix which used uppercase. Therefore, we're putting this behind a future flag to avoid breaking apps, and in Remix v2 we'll move to uppercase as the default.