Its getting too many files with shadow endpoints living inside individual files #3745
Replies: 4 comments 5 replies
-
You can try https://svemix.com/ |
Beta Was this translation helpful? Give feedback.
-
What's a shadow endpoint? |
Beta Was this translation helpful? Give feedback.
-
You can still use the explicit load syntax if you want to |
Beta Was this translation helpful? Give feedback.
-
I don't think using shadow endpoint makes your projects messy, I am using sveltekit for most of my projects currently, and I haven't given it much of a thought, initially, I was using the load function to get data when the shadow endpoint wasn't working properly. if you think using shadow endpoint get messy, you might use a load function to get your data from one endpoint using a variable to differentiate your request like this example then again, you won't get the benefit of populating your template directly, (you would need to use props) overall, I think shadow endpoint is great, it makes me focus on a different part of my projects, like when dealing with user authentication or order creation. the ability to just export a variable on my template and populate it from the endpoint is the cherry on top. |
Beta Was this translation helpful? Give feedback.
-
If there could be a way if shadow endpoints can be merged with .svelte file. It is more idiomatic I think. Since we already have individual files for standalone points and standalone endpoints cannot be replaced with shadow endpoints, since they have their own purpose.
Files living for both shadow endpoints and standalone endpoints makes projects with many files messy. I know there are downsides to merging it with .svelte file but these individual files are driving me crazy.
Beta Was this translation helpful? Give feedback.
All reactions