Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SvelteKit's router as a standalone component #36

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented Sep 16, 2020

@benmccann benmccann mentioned this pull request Oct 22, 2020
@benmccann benmccann force-pushed the routing branch 2 times, most recently from e2277b1 to ff07ab0 Compare January 24, 2021 06:13
@benmccann benmccann changed the title Sapper's router as a standalone component SvelteKit's router as a standalone component Mar 29, 2021
@madeleineostoja
Copy link

I think this is a really important RFC for the wider community. Svelte needs a blessed routing solution that isn't bolted onto Sveltekit, especially for SPAs where Sveltekit is overkill / cumbersome.

Personally I would have loved if that router was declarative rather than file-based (I love what tinro is doing), but taking my own preferences out of it having a routing solution semi-officially supported by Svelte is a must-have and an oversight in the current ecosystem.

@nikkwong
Copy link

nikkwong commented Nov 24, 2021

This is desperately desperately needed. I have a standard application where there are two types of users students and teachers. Right now, because of file based routing; I have to push each of their homepages to /student and /teacher rather than at the base route /.

Using src/routes/index.svelte and then in that component using <svelte:component this="{isTeacher ? TeacherHome : StudentHome})"> as a workaround is not a good solution because then I can't take advantage of the load function for each component. Currently there is no workaround; so aliases are desperately needed. Very much looking forward to this PR.

@CanRau
Copy link

CanRau commented Sep 28, 2022

might also solve sveltejs/kit#1130

@benmccann
Copy link
Member Author

@axljoker03 please stop approving all the RFCs. You're spamming all the maintainers and it's a bit annoying. You can simply leave a thumbs up or down on the post to indicate an opinion

@geekox86
Copy link

geekox86 commented May 3, 2024

Greetings all. May I ask about the status of this RFC, as my team is following a specific project directory structure that suits our needs and conventions but it is highly incompatible with the file-based routing. It would be super to be able to define the routes and sub-routes at each nested level of the UI layout using other approaches.

My objective is to be able to use the SSR offered by SvelteKit without the file-based router. Our backend API is not NodeJs and we would like to communicate directly with it from the frontend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants