DEV Community

loading...

Discussion on: How YOU can learn to use Svelte for your next JS project

Collapse
khrome83 profile image
Zane Milakovic

Svelte does not support routing out of the box. The closest official solution is to use Sapper. Some other people have built client side routing libraries as well when using Svelte as a SPA.

Overall it’s a really good framework, and my personal favorite.

Collapse
softchris profile image
Chris Noring Author

Yea I'm using a 3rd party router myself.. Works ok :)

Collapse
khrome83 profile image
Zane Milakovic

Which one did you find luck with?

Thread Thread
softchris profile image
Thread Thread
philnash profile image
Phil Nash

I just built my first full site with Svelte this weekend and svelte-routing worked nicely for me (I probably got a bit too far trying to write my own before reaching out to this library).

I'm enjoying the workflow so far. Even got pre-rendered static pages working too.

Thread Thread
khrome83 profile image
Zane Milakovic

How are you prerendering svelte? We used Sapper, but it has a collection of issues.

I have not tried Svelte as just a SPA yet. I wonder if I should...

Thread Thread
philnash profile image
Phil Nash

I took inspiration from this example: github.com/akaSybe/svelte-prerende...

I'll have to write up what I did when I have time.