Skip to content

Commit b99ed0f

Browse files
committed
Update changeset
1 parent 952379b commit b99ed0f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.changeset/direct-handlers-router.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"@remix-run/router": minor
33
---
44

5-
Add support for direct `handler` functions to be passed to `router.navigate` (submission navigations only) and `router.fetch`. This allows you to skip the creation of a new route to handle the `loader` or `action` (generally useful for fetching to a different endpoint), or you can also override the defined route `loader` or `action` at the call-site.
5+
- Add support for direct `action` functions to be passed to `router.navigate`. This allows you to skip the creation of a new route to handle the `action` , or you can also override the defined route `action` at the call-site.
66

77
**Defining an `action` at the callsite:**
88

@@ -32,6 +32,8 @@ router.navigate(null, {
3232
})
3333
```
3434

35+
- Add support for direct `action`/`loader` functions to be passed to `router.fetch`. This allows you to skip the creation of a new route to handle the `loader` or `action`, or you can also override the defined route `loader` or `action` at the call-site.
36+
3537
**Fetching to a direct loader without a defined route:**
3638

3739
```jsx

.changeset/direct-handlers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"react-router-dom": minor
33
---
44

5-
Add direct `handler` function support to `useSubmit`/`fetcher.submit`/`fetcher.load`. This allows you to skip the creation of a new route to handle the `loader` or `action` (generally useful for fetching to a different endpoint). If both a call-site handler and a route-defined handler exist, the call-site hndler will be used
5+
Add direct `action` function support to `useSubmit`/`fetcher.submit` and direct `loader` support to `fetcher.load`. This allows you to skip the creation of a new route to handle the `action` or `loader`. If both a call-site handler and a route-defined handler exist, the call-site handler will be used.
66

77
**`useSubmit:`**
88

0 commit comments

Comments
 (0)