-
In the app I'm working on, I've ended up with a lot of +page.js files, one in almost every route, that simply does this:
The point is just to pass along the exports from +page.server.js to +page.svelte. Am I approaching this wrong and missing a better way to structure this? It's so unlike Svelte and SvelteKit to have any unnecessary boilerplate, so I feel like I must be missing something. I feel like data returned from the +page.server.js load function should be available in the +page.svelte route without the extra +page.js file in every route. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You don't need |
Beta Was this translation helpful? Give feedback.
You don't need
+page.js
at all. You'll get the data directly from+page.server.js