Redux with Svelte is fun to use. We will play with Redux (Redux Toolkit) and Svelte (SvelteKit) on this repository. Redux is predictable state management container and we will integrate it with SvelteKit. This sample project is basically a counter increment/decrement demo that will help you get started and get the idea how to use Redux Toolkit in SvelteKit. No distraction guaranteed. Why Redux Toolkit? Relax bro, Redux Toolkit is modern recommended way to use Redux. It's official from Redux team and it's already included with Redux package.
Clone it and run the following commands.
npm run dev
Just look into src/routes/+page.svelte
and all code available there. I don't split to smaller files/module just because to easy to read and understand. If you enjoy it then you can split it into modules on seperate files.
src/routes/+page.svelte
to make it easy to follow.npm run dev
everything OK, but during npm run build
and npm run preview
it Internal 500 error. Read this [https://github.com/sveltejs/kit/issues/7154#issuecomment-1276404576].https://redux-with-sveltekit.vercel.app/
MIT
Maintained by Sony Arianto Kurniawan <sony@sony-ak.com> and contributors.