Comments (1)
"Reproduction" is supposed to contain the entire, self-contained code required to reproduce the issue.
I also cannot reproduce the problem, goto
works just fine in a setTimeout
callback.
Entire page code:
<script>
import { goto } from '$app/navigation';
function onClick() {
setTimeout(() => {
goto('/a');
}, 3000);
}
</script>
<button on:click={onClick}>Go to /a</button>
Maybe you are calling it on the server?
goto
is for usage on the page, on the server you need to use redirect
(which will not work in a regular timeout since at that point the response will have been sent, you would have to await
a promise).
from kit.
Related Issues (20)
- Assets imported from `/lib/server` for `$app/server`'s `read` are public in Vercel
- Why is `__vdpl` cookie used for Skew Protection in Vercel instead of `x-deployment-id` header? HOT 6
- Request: add debug log warning if `preserveSymlinks` is set to `true` in vite config
- Prerendering broken with ssr=false, prerender=true (and cloudflare) HOT 2
- Allow passing imagetools parameters when dynamically importing images for enhanced:img HOT 3
- enhanced:img doesn't generate multiple sizes when using dynamically imported image
- Options for Path-Based Trailing Slash HOT 4
- Export `ActionFailure` to allow `instanceof`
- Add ability to configure cache directory for image conversions in @sveltejs/enhanced-img
- Type Inference Issue in Svelte 5 HOT 1
- [HMR] setInterval calls keep stacking when a module is reloaded HOT 3
- Images from CMS are appearing as 404 when using npm run build + static adapter
- `[...rest]` route get's precedence over normal prerendered route in `production` mode HOT 2
- `parent` in load functions receive `@typescript-eslint/unbound-method` error
- Automatically generate OpenAPI description from routes
- An error with CSP if you run `npm run check` during `npm run dev` HOT 2
- VSCode inline breakpoint debug is not working HOT 3
- Forcing reload on +page.server redirects
- Docs: Copy Button for some code samples has typescript errors copied to clipboard HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kit.