Skip to content

Commit 35109d3

Browse files
authored
Add normalizeFormMEthod flag to the docs (#10242)
1 parent 8a183e1 commit 35109d3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/hooks/use-fetcher.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,12 @@ Tells you the method of the form being submitted: get, post, put, patch, or dele
222222
fetcher.formMethod; // "post"
223223
```
224224

225+
<docs-warning>The `fetcher.formMethod` field is lowercase without the `future.v7_normalizeFormMethod` [Future Flag][api-development-strategy]. This is being normalized to uppercase to align with the `fetch()` behavior in v7, so please upgrade your React Router v6 applications to adopt the uppercase HTTP methods.</docs-warning>
226+
225227
[loader]: ../route/loader
226228
[action]: ../route/action
227229
[pickingarouter]: ../routers/picking-a-router
228230
[indexsearchparam]: ../guides/index-search-param
229231
[link]: ../components/link
230232
[form]: ../components/form
233+
[api-development-strategy]: ../guides/api-development-strategy

docs/hooks/use-navigation.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ function SomeComponent() {
2828
}
2929
```
3030

31+
<docs-warning>The `useNavigation().formMethod` field is lowercase without the `future.v7_normalizeFormMethod` [Future Flag][api-development-strategy]. This is being normalized to uppercase to align with the `fetch()` behavior in v7, so please upgrade your React Router v6 applications to adopt the uppercase HTTP methods.</docs-warning>
32+
3133
## `navigation.state`
3234

3335
- **idle** - There is no navigation pending.
@@ -98,3 +100,4 @@ Note that this link will not appear "pending" if a form is being submitted to th
98100

99101
[location]: ../utils/location
100102
[pickingarouter]: ../routers/picking-a-router
103+
[api-development-strategy]: ../guides/api-development-strategy

0 commit comments

Comments
 (0)