Do not run `load` function if in hook's `handle` I disabled ssr at all
See original GitHub issueDescribe the problem
If I have:
hooks.ts:
/** @type {import('@sveltejs/kit').Handle} */
export function handle({ event, resolve }) {
return resolve(event, { ssr: false });
}
I should not have the below error in console:
window is not defined
if I don’t use if (browser) {} in context="module"'s load() function.
Importance
would make my life easier
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Hooks • Docs • SvelteKit
This function runs every time the SvelteKit server receives a request — whether that happens while the app is running, or during prerendering...
Read more >SvelteKit: disable SSR - server side rendering - Stack Overflow
Show activity on this post. Basically now you disable SSR on a per page/layout level, so instead of in src/hooks. server. js (yes,...
Read more >Invalid Hook Call Warning - React
Do not call Hooks inside functions passed to useMemo , useReducer , or useEffect . If you break these rules, you might see...
Read more >Using Non-SSR Friendly Components with Next.js
no -ssr is a React component that wraps non-SSR components. This wrapper makes it easy to deal with client-only components when working with...
Read more >useHooks - Easy to understand React Hook recipes
We bring you easy to understand React Hook code recipes so you can learn how React hooks work and feel more comfortable writing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Can someone please first provide an actual reproduction so we know what exactly you are talking about?
Closing this issue in the absence of a reproduction. Feel free to re-raise if a reproduction is created.