Hooks / handleFetch • Svelte Tutorial
For example, we could respond to requests for src/routes/a/+server.js with responses from src/routes/b/+server.js instead: Later, when we cover universal load functions, we'll see that event.fetch can also be called from the browser. In that scenario, handleFetch is useful if you have requests to a public URL like https://api.yourapp.com from the browser, that should be redirected to an internal URL (bypassing whatever proxies and load balancers sit between the API server and the public internet) when running on the server. Next: handleError
Hooks / handleFetch • Svelte Tutorial Skip to main content Tutorial Packages Playground Blog Basic Svelte Introduction Welcome to Svelte Your first component Dynamic attributes Styling Nested components HTML tags Reactivity State Deep state Derived state Inspecting state Effects Universal reactivity Props Declaring props Default values Spread props Logic If blocks Else blocks Else-if blocks Each blocks Keyed each blocks Await blocks Events DOM events Inline handlers Capturing Component events Spreading events Bindings Text inputs Numeric inputs Checkbox inputs Select bindings Group inputs Sele
related reading
- SWR: React Hooks for Data Fetching - Vercelswr.vercel.app
- You Might Not Need an Effect – Reactreact.dev
- Web standards • SvelteKit Docskit.svelte.dev
- Svelte tutorial note | sung.codessung.codes
- State management • SvelteKit Docskit.svelte.dev
- How to fetch data in React [2024] - Robin Wieruchrobinwieruch.de
- Getting Started: Fetching Data | Next.jsnextjs.org
- Getting Started: Fetching Data | Next.jsnextjs.org
- Errors and redirects / Basics • Svelte Tutoriallearn.svelte.dev
- RSC From Scratch. Part 1: Server Components · reactwg server-components · Discussion #5github.com
- Building a GitHub App that responds to webhook events - GitHub Docsdocs.github.com
- Getting Started: Fetching Data | Next.jsnextjs.org