Need advice about which tool to choose?Ask the StackShare community!

Redux

30.6K
23.3K
+ 1
674
Svelte

1.6K
1.6K
+ 1
499
Add tool

Redux.js vs Svelte: What are the differences?

Introduction:

Redux.js and Svelte are two popular JavaScript frameworks used for developing web applications. While both frameworks have their own unique features and advantages, there are several key differences between them that developers should be aware of.

  1. State Management Approach: Redux.js is a state management library that follows a centralized approach, where the state of an application is stored in a single global store. Svelte, on the other hand, is a reactive framework that allows developers to declare state variables and automatically updates the DOM whenever the state changes.

  2. Bundle Size: Redux.js comes with a larger bundle size compared to Svelte. This is because Redux.js requires additional libraries and middleware to handle state management, resulting in a larger overall file size. Svelte, on the other hand, is a compiler-based framework that optimizes and compiles the code at build-time, resulting in smaller bundle sizes.

  3. Performance: Svelte offers better performance compared to Redux.js. Since Svelte compiles the code at build-time, it eliminates the need for runtime libraries and reduces the overhead associated with virtual DOM updates. This results in faster rendering and improved overall performance.

  4. Learning Curve: Redux.js has a steeper learning curve compared to Svelte. Redux.js requires developers to understand concepts like actions, reducers, and middleware, which can be initially overwhelming for beginners. Svelte, on the other hand, follows a more intuitive and straightforward approach, making it easier for developers to get started.

  5. Developer Experience: Redux.js provides a rich developer experience with powerful tools like Redux DevTools for debugging and time-traveling. These tools allow developers to inspect and manipulate the state of the application, making it easier to understand and debug complex state management. Svelte, although not as feature-rich as Redux.js in terms of developer tools, provides a simpler and more streamlined development experience.

  6. Integration with Existing Codebase: Redux.js is more suitable for integrating with existing codebases, especially if the application already has a significant amount of Redux-based code. Svelte, on the other hand, is a complete framework with its own syntax and compiler, making it more suitable for new projects or applications that don't heavily depend on Redux.js.

In summary, Redux.js and Svelte differ in terms of their state management approach, bundle size, performance, learning curve, developer experience, and integration with existing codebases. Choosing between the two depends on the specific requirements and constraints of the project.

Decisions about Redux and Svelte
Máté Homolya
Senior developer at Self-employed · | 11 upvotes · 297K views
Migrated
from
ReactReact
to
SvelteSvelte

Svelte is everything a developer could ever want for flexible, scalable frontend development. I feel like React has reached a maturity level where there needs to be new syntactic sugar added (I'm looking at you, hooks!). I love how Svelte sets out to rebuild a new language to write interfaces in from the ground up.

See more
Alex Guesnon
Full-stack software engineer · | 3 upvotes · 119.2K views
Chose
SvelteSvelte
over
Vue.jsVue.js

Svelte 3 is exacly what I'm looking for that Vue is not made for.

It has a iterable dom just like angular but very low overhead.

This is going to be used with the application.

for old/ lite devices . ie. * android tv, * micro linux, * possibly text based web browser for ascci and/or linux framebuffer * android go devices * android One devices

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Redux
Pros of Svelte
  • 191
    State is predictable
  • 150
    Plays well with React and others
  • 126
    State stored in a single object tree
  • 79
    Hot reloading out of the box
  • 74
    Allows for time travel
  • 14
    You can log everything
  • 12
    Great tutorial direct from the creator
  • 7
    Endorsed by the creator of Flux
  • 7
    Test without browser
  • 6
    Easy to debug
  • 3
    Enforces one-way data flow
  • 3
    Granular updates
  • 2
    Blabla
  • 58
    Performance
  • 40
    Reactivity
  • 35
    Components
  • 35
    Simplicity
  • 34
    Javascript compiler (do that browsers don't have to)
  • 30
    Lightweight
  • 28
    Near to no learning curve
  • 26
    Real Reactivity
  • 26
    Fast as vanilajs
  • 22
    All in one
  • 18
    Compiler based
  • 18
    Use existing js libraries
  • 17
    SSR
  • 16
    Scalable
  • 16
    Very easy for beginners
  • 13
    Composable
  • 12
    No runtime overhead
  • 12
    Ease of use
  • 10
    Built in store
  • 9
    Typescript
  • 7
    Start with pure html + css
  • 7
    Best Developer Experience
  • 6
    Templates
  • 4
    Speed

Sign up to add or upvote prosMake informed product decisions

Cons of Redux
Cons of Svelte
  • 13
    Lots of boilerplate
  • 6
    Verbose
  • 5
    Steep learning curve
  • 5
    Design
  • 4
    Steeper learning curve than RxJs
  • 4
    Steeper learning curve than MobX
  • 3
    Event Listener Overload
  • 2
    Little to no libraries
  • 2
    Complex
  • 2
    Learning Curve
  • 2
    Hard to learn

Sign up to add or upvote consMake informed product decisions

- No public GitHub repository available -

What is Redux?

It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. t provides a great experience, such as live code editing combined with a time traveling debugger.

What is Svelte?

If you've ever built a JavaScript application, the chances are you've encountered – or at least heard of – frameworks like React, Angular, Vue and Ractive. Like Svelte, these tools all share a goal of making it easy to build slick interactive user interfaces. Rather than interpreting your application code at run time, your app is converted into ideal JavaScript at build time. That means you don't pay the performance cost of the framework's abstractions, or incur a penalty when your app first loads.

Need advice about which tool to choose?Ask the StackShare community!

Jobs that mention Redux and Svelte as a desired skillset
What companies use Redux?
What companies use Svelte?
Manage your open source components, licenses, and vulnerabilities
Learn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Redux?
What tools integrate with Svelte?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

JavaScriptGitHubReact+12
5
4205
Oct 11 2019 at 2:36PM

LogRocket

JavaScriptReactAngularJS+8
5
2014
JavaScriptGitHubNode.js+29
14
13645
GitHubPythonReact+42
49
40939
GitHubPythonNode.js+47
55
72820
What are some alternatives to Redux and Svelte?
Cycle.js
A functional and reactive JavaScript framework for predictable code
MobX
MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming (TFRP). React and MobX together are a powerful combination. React renders the application state by providing mechanisms to translate it into a tree of renderable components. MobX provides the mechanism to store and update the application state that React then uses.
Flux
Flux is the application architecture that Facebook uses for building client-side web applications. It complements React's composable view components by utilizing a unidirectional data flow. It's more of a pattern rather than a formal framework, and you can start using Flux immediately without a lot of new code.
React
Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
RxJS
RxJS is a library for reactive programming using Observables, to make it easier to compose asynchronous or callback-based code. This project is a rewrite of Reactive-Extensions/RxJS with better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
See all alternatives