How is this convention better? #5815
Replies: 3 comments 5 replies
-
It is definitely a trade-off, though editors like VSCode show the parent directory in the tab name when you have mutiple files with the same name open. |
Beta Was this translation helpful? Give feedback.
-
This was discussed in excruciating detail in the original discussion, there's hundreds of comments there on the rationale and all the arguments for an against. I personally don't love using special characters in the filenames, but directory based routing has several very large benefits, Next.js is moving in the same direction |
Beta Was this translation helpful? Give feedback.
-
If you haven't already, I'd recommend listening to Svelte Radio E49. @Rich-Harris explains some of the concerns and nuances that might have been missed in the discussion, and it certainly helped me to understand better the purpose of the changes. |
Beta Was this translation helpful? Give feedback.
-
Instead of defining routes via files and folders, routes are only defined by folders. Layout and page components are defined with +layout.svelte and +page.svelte files — so src/routes/about.svelte would become src/routes/about/+page.svelte.
Sorry, but I don't understand how this is better, when working on different routes on the editor, we would end with different open files all named
+page.svelte
not making it clear what is what.Am I missing something here? Because I don't get it. Much rather have
about.svelte
portfolio.svelte
photos.svelte
and so on, than having+page.svelte
+page.svelte
+page.svelte
Beta Was this translation helpful? Give feedback.
All reactions