Skip to content

Commit d1bc7cf

Browse files
committed
Update changeset + chanbgelog
1 parent 6cbd0b1 commit d1bc7cf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.changeset/raw-payload-submission.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ async function action({ request }) {
2323
```js
2424
// Opt-into JSON encoding with `encType: "application/json"`
2525
function Component() {
26+
let navigation = useNavigation();
2627
let submit = useSubmit();
2728
submit({ key: "value" }, { encType: "application/json" });
2829
// navigation.formEncType => "application/json"
@@ -31,13 +32,14 @@ function Component() {
3132

3233
async function action({ request }) {
3334
// request.headers.get("Content-Type") => "application/json"
34-
// await request.json => { key: "value" }
35+
// await request.json() => { key: "value" }
3536
}
3637
```
3738

3839
```js
39-
// Opt-into JSON encoding with `encType: "application/json"`
40+
// Opt-into text encoding with `encType: "text/plain"`
4041
function Component() {
42+
let navigation = useNavigation();
4143
let submit = useSubmit();
4244
submit("Text submission", { encType: "text/plain" });
4345
// navigation.formEncType => "text/plain"

packages/react-router-dom/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141

4242
async function action({ request }) {
4343
// request.headers.get("Content-Type") => "application/json"
44-
// await request.json => { key: "value" }
44+
// await request.json() => { key: "value" }
4545
}
4646
```
4747

4848
```js
49-
// Opt-into JSON encoding with `encType: "application/json"`
49+
// Opt-into text encoding with `encType: "text/plain"`
5050
function Component() {
5151
let submit = useSubmit();
5252
submit("Text submission", { encType: "text/plain" });

0 commit comments

Comments
 (0)