re: React Hooks vs. Svelte VIEW POST

re: Great article! I'm in love with Svelte, it makes me feel so productive. Recently I made one small project with Svelte and then with React. Just to ...

Thanks! I think it's ready. I'm already using it in production. To avoid making a mess of spaghetti as complexity increases, I've been finding it helpful to keep Svelte components as small as possible, use Svelte stores heavily to deal with data loading or to share state between components, minimize the usage of reactive statements, and generally try to keep the amount of JavaScript in each component to a minimum. I plan to write these suggestions up in a longer post one day soon.


Looking forward to these suggestions! Right now I try to isolate my main .svelte file keeping only core structure there. Then I have an 'actions' folder and 'services' folder. Functions like fetchData() is inside services and listData() inside actions. So in my main .svelte I just call these actions. I think it's clean and easy to maintenance.


code of conduct - report abuse