Maybe i'm just off in my understanding. You can use svelte components to create reusable visual components. But a component itself (that is not a page by itself) cannot have a load function or defined actions, right? Wouldn't it be useful to have fully-functional components?
An example: The upload component. It's the visual component + a load function that allows to show an already uploaded file; plus the action that is required to upload and maybe replace the file.
To my knowledge, with the current state of sveltekit, the handling of data loading and the action to handle the upload has to be implemented in every page using the component.
Describe the proposed solution
Maybe a separate directiory src/components where you can define svelte components including +component.ts or +component.server.ts for actions and loading.
Alternatives considered
If this is already possible with the current system, just give me a hint.
Describe the problem
Maybe i'm just off in my understanding. You can use svelte components to create reusable visual components. But a component itself (that is not a page by itself) cannot have a load function or defined actions, right? Wouldn't it be useful to have fully-functional components?
An example: The upload component. It's the visual component + a load function that allows to show an already uploaded file; plus the action that is required to upload and maybe replace the file.
To my knowledge, with the current state of sveltekit, the handling of data loading and the action to handle the upload has to be implemented in every page using the component.
Describe the proposed solution
Maybe a separate directiory src/components where you can define svelte components including +component.ts or +component.server.ts for actions and loading.
Alternatives considered
If this is already possible with the current system, just give me a hint.
Importance
nice to have
Additional Information
No response