Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have used both SvelteKit and React. Dev velocity was great in the beginning with SvelteKit when everything was super simple but decreased drastically as the project grew. Went back to Next. Apart from devs, none really cares if you wrote it in Svelte, React or bare HTML/CSS or if your site loads double digit milliseconds slower.


Could you please give a heads up what makes Seveltkit difficult in a larger code base?


My app had about 50 routes (by the design there were about 80 pages, but of course some common patterns emerged). I wouldn't call it large, but it's past "toy" and probably not "small" for most.

I didn't have a problem, so I'm curious what the previous poster ran in to.

the only thing I can think of is that it doesn't impose much structure on the "lib" folder -- that's where code/components that aren't directly in the route files go. But there's nothing keeping you from keeping that organized yourself. So that's not really a problem, but something you might want to think about early if you plan to build out the app in the future.


I have tried to use sveltekit once and turned around in 20 minutes as routing is severely limited. All I wanted to do was to route based on domain, with a different set of routes for one of the domains. Not exactly complicated or uncommon, but not something you can do with the sveltekit router.


This is gone over in the github threads about such a feature - basically, as two different projects semantically, the best thing is to create two different projects physically, in a monorepo. All the code-sharing with none of the additional complexity.


So you cannot do dynamically named routes in svelte (e.g. localization)?

Just curious, I have no experience in svelte. It does sound like a major limitation.


As for routing, I guess that gets unmanageable pretty fast. Just in the sample blog tutorial here [0], you get confused with the number of files and nested folders that has same file names as level above.

[0] https://learn.svelte.dev/tutorial/params


Personally, I really missed the larger state management libraries that are well-available for react.

Layouts, passing difficult props to components, passing state up and down in the tree (i.e. refs)

Feels like SvelteKit has a major - just use whatever SvelteKit offers, which is generally enough for smaller projects.


Svelte Stores and connect api are a simpler and more powerful solution to this than any library I’ve ever used. I’m curious what you would recommend.


Lack of dev familiarity.


>> but decreased drastically as the project grew

I'm curious why?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: