You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ce60786
Browse filesBrowse the repository at this point in the historyBrowse files
-**Generics**: Use descriptive lowercase names for type parameters (e.g., `source`, `method`, `pattern`) instead of single uppercase letters like `T`, `P`, or `K`
28
29
-**Comments**: Only add non-JSDoc comments when the code is doing something surprising or non-obvious
Copy file name to clipboardExpand all lines: packages/fetch-router/CHANGELOG.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,24 @@ This is the changelog for [`fetch-router`](https://github.com/remix-run/remix/tr
72
72
73
73
The `FormActionOptions` type has also been renamed to `FormOptions`.
74
74
75
+
- Add functional aliases for creating routes that respond to a single request method
76
+
77
+
```tsx
78
+
import { del, get, patch, post } from'@remix-run/fetch-router'
79
+
80
+
let routes =route({
81
+
home: get('/'),
82
+
login: post('/login'),
83
+
logout: post('/logout'),
84
+
profile: {
85
+
show: get('/profile'),
86
+
edit: get('/profile/edit'),
87
+
update: patch('/profile'),
88
+
destroy: del('/profile'),
89
+
},
90
+
})
91
+
```
92
+
75
93
## v0.12.0 (2025-11-25)
76
94
77
95
- BREAKING CHANGE: Moved all response helpers to `@remix-run/response`. Update your imports:
@@ -319,7 +337,6 @@ This is the changelog for [`fetch-router`](https://github.com/remix-run/remix/tr
319
337
- Add support for `request.signal` abort, which now short-circuits the middleware chain. `router.fetch()` will now throw `DOMException` with `error.name === 'AbortError'` when a request is aborted
320
338
- Fix an issue where `Router`'s `fetch` wasn't spec-compliant
321
339
- Provide empty `context.formData` to `POST`/`PUT`/etc handlers when `parseFormData: false`
322
-
- Add functional aliases for routes that respond to a single HTTP verb
0 commit comments