Replies: 6 comments 10 replies
-
Great post, @fractalhq. I've been talking to Ben and he's working on more streamlined support for 3rd party routers in Kit. (Currently it can be done by creating an I would love for Routify to be the default router of Kit and dedicate my efforts to the Kit experience. That said, I know a lot of people have worked very hard on the existing router and some may have grown attached - as I have. However if the Kit team feels that Kit would benefit from the extra hands on deck and a new router, I'm all in. My goal remains to build a routing solution that beats anything available today, while remaining as easy as Svelte itself. Working alongside the core team could unlock some true magic. We'll be presenting some of the new R3 features at the upcoming Svelte Summit. |
Beta Was this translation helpful? Give feedback.
-
I'm curious, what are some examples of functionality that Routify could offer that Kit can't so far? I'm not familiar enough with Routify at this point |
Beta Was this translation helpful? Give feedback.
-
I have a PR that exposes the Vite APIs that SvelteKit is built on-top of: #2663. You should be able to use that to plugin different routers to SvelteKit. Routfiy turned out not to work with it though because it doesn't use Svelte's built-in SSR functionality and instead uses JSDOM. It turns out there aren't really many routers that support native SSR besides SvelteKit's. I think As for functionality that exists in Routify, but not Kit yet, I'd say some of the ones I think are more interesting are route guards/hooks, metadata, and multiple router instances. These are all things we could add to Kit, but given all the various competing demands isn't something I've gotten to yet. I'm happy to review PRs if folks would like to add them though |
Beta Was this translation helpful? Give feedback.
-
Routing is the core of SvelteKit as it is with Next.js. Routing paired with SSR must work flawlessly because of SEO and all nuances which significantly impact SEO rankings. I mean, this is one of the main reasons we use SvelteKit or Next.js and I wouldn't want to have experiments there, it's just too much money on the table and hey, never change a running system. If routing/ssr/SEO does not work perfectly, I would switch within seconds. SEO is too important and I chose SvelteKit because of SvelteKit, its vertical integration, which is almost like an Apple product and especially because of their core maintainers, not disrespecting any other maintainers but yeah. Before we decided for Svelte, a big part of the due diligence were the maintainers, just to hint where users are coming from. Just to give another example, imagine Michael Jackson who built react-router would knock on Next.js' door and ask to integrate his router. This wouldn't make any sense because it's an essential part of the entire thing and Next would—of course—politely decline. Btw, Michael Jackson built Remix which builds on his prior work and react-router. So, there are many options to use one's energy and go further and enrich the ecosystem without fragmenting because it would be still Svelte. Moreover, users can chose between the battle-tested built-in router which covers 99.9% of users' needs and other libs. If we make another lib the default, the battle-tested, flawless, built-in router is removed from the market and from an oiled system. Plus distraction, breaking changes for all of us, in particular the users. Aiming now for the perfect integration without breaking changes would be just an aim and the end of the day, we know how migrations go. Further, in SEO land you don't see breaking changes, SEO impact is slow and cause and effect are far apart. It's very hard to find the cause for organic traffic changes. And having "some" router exchanged in the meantime, would not help either. For Svelte it's important to have sane defaults and let third-parties extend, otherwise we would miss the opportunities of building a proper ecosystem around Svelte and SvelteKit (if we integrated everything into core). So, it's also an important decision for the core maintainers—only by keeping the core lean and being very cautious about what goes into core, they set the foundation for a proper ecosystem and its growth. Let's spend out energy on proper APIs for third parties who want to plugin, so even more maintainers can extend SvelteKit instead of reducing options. So, I highly appreciate any work around Svelte, because we all have one thing in common, we love Svelte but I would be super strict to rip and exchange out core and moneymaking parts of Svelte. And, btw It's always easy to add features but it's hard to maintain and remove them. |
Beta Was this translation helpful? Give feedback.
-
Late to this one, I don't think allowing third-party routers is anything but a good thing for a variety of reasons and I don't think this necessarily needs to impact kit in anyway. It may make sense in the future to consolidate efforts but that doesn't need to happen. On the two routers more broadly: I think there are problem few issues with both, so I don't think getting into a comparison game is particularly helpful. They both have their advantages and disadvantages that would need to be ironed out before any one of them could claim title 'destroyer of all routers'. It may be that such a solution is unrealistic due to different use-cases or they may just need to implementation and design changes. We need a suite of differing and complex use cases to really answer that question. When I get the chance I'll go into more detail on the problems with some of the existing routing solutions. I think I've tried every router available at this point and I don't think I found one that handles everything in the manner that I'm looking for. |
Beta Was this translation helpful? Give feedback.
-
Any progress on this? |
Beta Was this translation helpful? Give feedback.
-
@ghostdevv mentioned to me that someone has floated the idea of having a Routify-powered router for SvelteKit. I just wanted to give my 2c on the matter-
As a long-time Routify evangelist- the idea is certainly exciting! Jake has done amazing things with Routify, and I've always felt that the entire svelte community should be able to benefit from his innovations. I try to spend a few hours / day providing support in the Svelte discord, and I encounter a lot of people with routing-related problems that Jake has solved elegantly in the world of Routify.
I know that Routify 3 supports kit (which is amazing and I'll certainly be using it!!), but I feel that a unification of efforts here could benefit everyone. I know that man-power is spread thin on kit (god bless ben and the svelte core team), and the router is solid right now- but I think that someone like Jake leading the effort towards a more powerful routing story could be invaluable.
While I want to encourage Jake and the Kit team to consider working together on this, I don't want to assume anything about anyones plans (I've only spoken to GHOST about this so far), and I don't want to diminish Jakes efforts on Routify 3- hence this discussion! I'm mostly curious about what people think.
Beta Was this translation helpful? Give feedback.
All reactions