redux-with-svelte Svelte Themes

Redux With Svelte

Simple project (increment/decrement counter) to understand how to use Redux (via Redux Toolkit) with Svelte (feat. Vite). No distraction guaranteed.

redux-with-svelte

Redux with Svelte is fun to use. We will play with Redux (Redux Toolkit) and Svelte on this repository. Redux is predictable state management container and we will integrate it with Svelte. 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 Svelte (featuring Vite). 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.

How to run?

Clone it and run the following commands.

npm run dev

Which file should I focus?

Just look into src/App.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.

Technical notes

  • Using Redux Toolkit [https://redux-toolkit.js.org/]
  • Using Svelte [https://svelte.dev/] featuring Vite [https://vitejs.dev/]
  • No CSS, to make no distraction while learning.
  • No imports between internal files, to make it easy to follow.
  • No other third-party libraries, to make it easy to follow.
  • All code in on src/App.svelte to make it easy to follow.
  • Why using Redux Toolkit? It simplifies Redux usage and makes it easier to learn. Inside Redux Toolkit the Redux package is already included, so you don't need to install it separately.

Goals

  • Create a simple counter app.
  • Make Svelte and Redux Toolkit work together.
  • Easy to follow code and comments.
  • No CSS, to make no distraction while learning.
  • Easy to understand Redux Toolkit concepts and ready to use in your own project.

Demo

https://redux-with-svelte.vercel.app

License

MIT

Maintained by Sony Arianto Kurniawan <sony@sony-ak.com> and contributors.

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes