Which project does this relate to?
Router
Describe the bug
So I have a button that when clicked, triggers a server function with a redirect inside. When I click the button, it doesn't redirect at all. I've tried throwing the redirect as well as setting throw: true but still isn't working. I've also tried with an external link via href option and also an internal link via to option but both aren't working as well. even tried reloadDocument: true and also replace: true.
Your Example Website or App
https://github.com/nandcello/repro-redirect-bug
Steps to Reproduce the Bug or Issue
bun create @tanstack/start@latest
- add a button that calls a
createServerFn with handler
throw redirect({
to: '/demo/start/ssr',
// throw: true // this also doesn't work
})
- click the button to trigger the server fn
- nothing happens
Expected behavior
As a user, I expect to be redirected to the link.
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.132.0
- OS: macOS
- Browser: Safari & Edge
- Browser Version: 142.0.3595.94 (Official build) (arm64)
- Bundler: vite
- Bundler Version: 7.1.7
Additional context
As per server fn docs, i should be able to do this
Which project does this relate to?
Router
Describe the bug
So I have a button that when clicked, triggers a server function with a
redirectinside. When I click the button, it doesn't redirect at all. I've tried throwing the redirect as well as settingthrow: truebut still isn't working. I've also tried with an external link viahrefoption and also an internal link viatooption but both aren't working as well. even triedreloadDocument: trueand alsoreplace: true.Your Example Website or App
https://github.com/nandcello/repro-redirect-bug
Steps to Reproduce the Bug or Issue
bun create @tanstack/start@latestcreateServerFnwith handlerExpected behavior
As a user, I expect to be redirected to the link.
Screenshots or Videos
No response
Platform
Additional context
As per server fn docs, i should be able to do this