svelte-spa-router VS svelte-routing

Compare svelte-spa-router vs svelte-routing and see what are their differences.

svelte-spa-router

Router for SPAs using Svelte 3 (by ItalyPaleAle)

svelte-routing

A declarative Svelte routing library with SSR support (by EmilTholin)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
svelte-spa-router svelte-routing
17 7
1,474 1,980
- -
5.7 8.2
26 days ago about 1 month ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

svelte-spa-router

Posts with mentions or reviews of svelte-spa-router. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-22.
  • Svelte 4 Released
    4 projects | news.ycombinator.com | 22 Jun 2023
  • UI kits, form validation, SPA routing. Why basic libraries are so hard to find.
    6 projects | /r/sveltejs | 3 Jun 2023
  • Svelte-spa-router: Router for SPAs using Svelte 3
    1 project | news.ycombinator.com | 24 May 2023
  • [Q] Can I use sveltekit with rust?
    1 project | /r/sveltejs | 13 Apr 2023
    But the choice depends on the type of application though. If your routes are not dynamic (not using variables within route) then you can use static site generation (SSG) which will generate the various html files. Otherwise you need to use the same file (index.html#my/dynamic/route/5). To my knowledge svelteKit doesn't support hash-based routes. You might be able to configure routing without it, but if you need that, you me be better off to use svelte with svelte-spa-router and not sveltekit.
  • Thoughts on Svelte
    15 projects | news.ycombinator.com | 27 Mar 2023
    https://github.com/ItalyPaleAle/svelte-spa-router seems good too.

    but it's not official, and Svelte project seems careless for client routing, instead it tries to convince everyone use its SSR-first kit, that "can do CSR too", which means you have to carry the whole SSR code base and its documentation into your CSR project totally unnecessarily.

    I get it Vercel needs SSR for its business, I don't get it why it keeps selling everyone that "my SSR-first framework is great for CSR SPA too", it is NOT, not at all.

  • SvelteKit worth?
    1 project | /r/sveltejs | 6 Sep 2022
    For a simple static site you can just use svelte with svelte-spa-router. If you want SSG, use Astro, it's a lot more mature than SvelteKit.
  • How do i make the Nav links work in Svelte?
    3 projects | /r/sveltejs | 23 Mar 2022
    Svelte SPA Router - You need a router. NextJS, which you have experienced in, comes with a router.
  • Some front-end web technologies you should be aware of as a newcomer 🧐
    22 projects | dev.to | 22 Feb 2022
    Svelte SPA Router
  • svelte-spa-router not registating external hash change
    2 projects | /r/sveltejs | 8 Feb 2022
    I am using Keycloak for logging into my app and svelte-spa-router for hash based routing inside my SPA. After successful login, Keycloak should redirect back to http://localhost:1234/#/myRoute . However, Keycloak appends some suffixes to this route. The route ends up looking something like this: http://localhost:1234/#/myRoute&state=hexstring&session_state=hexstring... etc As I defined my route (inside routes.js) as /myRoute , the router fails to parse the URL returned by keycloak. Looking at the source code I noticed that keycloak changes the URL back to the "clean" parameterless URL: http://localhost:1234/#/myRoute using a call to window.location.replaceState . Unfortunately, this call does not get reflected in the spa-routers internal svelte store (i.e. $location).
  • My Evaluation of SvelteKit for Full-Stack Web App Development
    17 projects | news.ycombinator.com | 5 Jan 2022
    How does Routify compare with svelte-spa-router[1]? I really like svelte-spa-router for a simple SPA, though I think a lot of SPA routers don't always handle state well.

    [1] https://github.com/ItalyPaleAle/svelte-spa-router

svelte-routing

Posts with mentions or reviews of svelte-routing. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-11.
  • How's routing done in Vanilla Svelte?
    2 projects | /r/sveltejs | 11 Jul 2023
    participated in discussion about the initiative to keep svelte-routing package alive on their github issue: https://github.com/EmilTholin/svelte-routing
  • UI kits, form validation, SPA routing. Why basic libraries are so hard to find.
    6 projects | /r/sveltejs | 3 Jun 2023
  • Help for micro-frontend / monorepo architecture
    2 projects | /r/AskProgramming | 22 May 2023
    So my questions are : Is it possible to have routes inside the MFs ? If yes, should I use something like this (https://github.com/EmilTholin/svelte-routing) even if it's not official svelte support ? I don't really see informations about entry points on the Turborepo doc. I want to be able to work on each MF independantly (I mean see them in the browser in dev mode) but then just serve them as modules for the app shell in prod mode. I imagine this is possible but is it a configuration I need to implement myself with the package.json files or is it about Turborepo ? I read this (https://michalzalecki.com/micro-frontends-module-federation-monorepo/) article about a similar approach with Webpack, but in this article I don't quite see where is the difference between the bundling part of Webpack (wich can be whatever I want Vite for Svelte, Turbo for Next, etc.) and the monorepo handling part. So how/why only one tool (webpack) instead of many others (turborepo + other bundlers) ?
  • Thoughts on Svelte
    15 projects | news.ycombinator.com | 27 Mar 2023
    I used https://github.com/EmilTholin/svelte-routing with great success, though it looks like the maintainer has recently stopped maintaining it, and recommending sveltekit.

    Still, I'd give try, it looks like people are still using it, and perhaps someone else will pick up the burden of maintenance, since there's clearly a ton of demand: https://github.com/EmilTholin/svelte-routing/issues/236

  • Tips for sveltejs newbie
    1 project | /r/sveltejs | 6 Jul 2022
    I'll use SvelteKit in the future but I wanted to learn Svelte with the most basic setup first. I don't want to use SSR anyway. I went with a Vite + Typescript setup and used this router library. It's really simple and did work without any hassle. I love the mindblowing simplicity of Svelte, the tiny builds and the blazing fast dev-server HMR. Coming from React and Vue.
  • What's the current state of frontend frameworks/stacks thats easiest to use for small personal projects?
    3 projects | /r/webdev | 7 Sep 2021
    Second point, yes you can add routes. Here is the refence I used: https://github.com/EmilTholin/svelte-routing
  • State of the Sveltejs Ecosystem?
    10 projects | /r/sveltejs | 28 Aug 2021
    Routing: We have a few third party ones such as routify, svelte-spa-router and svelte-routing as well as the clientside routers included in SvelteKit and Sapper.

What are some alternatives?

When comparing svelte-spa-router and svelte-routing you can also consider the following projects:

svelte-routify-windi-vite - Svelte Starter template with Routify file-based router, WindiCSS Tailwind compiler and Vite

routify - Automated Svelte routes

awesome-sveltekit - Awesome examples of SvelteKit in the wild

electron-sveltekit - Electron and SvelteKit integration

tinro - Highly declarative, tiny, dependency free router for Svelte's web applications.

svelte-starter-kit - Svelte with brilliant bells and useful whistles

urql - The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

capacitor - Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️

svelte-query - Performant and powerful remote data synchronization for Svelte

sswr - 🔥 Svelte stale while revalidate (SWR) data fetching strategy