Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"prettier-plugin-tailwindcss": "^0.6.14",
"tailwindcss": "^3.4.17",
"typescript": "^5.9.2",
"typescript-eslint": "8.41.0",
"typescript-eslint": "^8.41.0",
"vite": "^6.3.5"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/routes/solid-router/reference/response-helpers/redirect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,13 @@ function redirect(url: string, init?: number | RouterResponseInit): CustomRespon
```

The `RouterResponseInit` type extends the native [`ResponseInit`](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options) interface.

## Revalidate Query Keys

You can pass query keys to the redirect helper to revalidate them.

```ts
redirect("/", { revalidate: ["getUser", getUser.keyFor(id)] });
```

This will only invalidate the query keys passed to the redirect helper instead of the entire next page.