StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Application & Data
  3. Frameworks
  4. Javascript Mvc Frameworks
  5. Mithril vs Svelte

Mithril vs Svelte

OverviewDecisionsComparisonAlternatives

Overview

Mithril
Mithril
Stacks89
Followers79
Votes86
Svelte
Svelte
Stacks1.7K
Followers1.6K
Votes502
GitHub Stars84.6K
Forks4.7K

Mithril vs Svelte: What are the differences?

Introduction: Mithril and Svelte are two popular JavaScript frameworks that are used to build user interfaces for web applications. While both frameworks share the goal of making web development more efficient and streamlined, there are several key differences between them.

  1. Virtual DOM vs Compiler approach: Mithril, like other popular frameworks such as React, uses a virtual DOM to efficiently update the UI. It compares the previous and current states of the virtual DOM and applies only the necessary updates. On the other hand, Svelte takes a different approach by compiling the components at build time. This means that Svelte doesn't rely on the virtual DOM and generates code that is optimized to run directly on the browser, resulting in a smaller bundle size and faster rendering.

  2. Size: Mithril is known for its small size, weighing in at just a few kilobytes. It has a minimalistic design and offers only the essential features needed to build web applications. Svelte, although it offers more features and capabilities, tends to have a larger bundle size due to its compiler-based approach. However, Svelte's ability to eliminate runtime dependencies can still result in smaller overall bundle sizes in certain cases.

  3. Reactivity: Both Mithril and Svelte provide reactive programming capabilities, allowing developers to efficiently update the user interface based on changes in the underlying data. However, Svelte takes this a step further with its reactive declarations and reactive statements. These features automatically update the UI whenever the referenced data changes, providing a more intuitive and declarative approach to handling reactivity.

  4. Component Structure: Mithril organizes components using a hierarchical structure, where components can have child components that inherit properties and state from their parent. Svelte, on the other hand, uses a flat component structure, where all components are independent and can be easily reused or composed together. This provides more flexibility in managing and organizing components in complex applications.

  5. Syntax and Templating: Mithril uses a JavaScript-based syntax for creating components and templates, allowing developers to use the full power of JavaScript to define and manipulate UI components. Svelte, on the other hand, uses a custom templating language that resembles HTML, with added features like reactive statements and expressions. This can make it easier for developers who are more familiar with HTML to quickly get started with Svelte.

  6. Build Process: Mithril can be used within any build process or framework, and it doesn't have any specific build requirements. Developers can choose their preferred build tools and configure them accordingly. Svelte, however, has its own build process based on Rollup, a module bundler. It provides a streamlined build experience with features like automatic code splitting and dead code elimination, but it can be a bit more restrictive for developers who prefer more flexibility in their build setup.

In summary, Mithril and Svelte have distinct approaches to building web applications. Mithril utilizes a virtual DOM, has a small footprint, supports hierarchical component structure, uses JavaScript syntax for templating, and can be easily integrated into any build process. On the other hand, Svelte uses a compiler approach, offers advanced reactivity features, has a different component structure with flat organization, uses its own templating language resembling HTML, and comes with its own build process based on Rollup.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Advice on Mithril, Svelte

Máté
Máté

Senior developer at Self-employed

May 28, 2020

Decided

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.

311k views311k
Comments
Alex
Alex

Full-stack software engineer

Apr 25, 2020

Decided

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
125k views125k
Comments

Detailed Comparison

Mithril
Mithril
Svelte
Svelte

Mithril is around 12kb gzipped thanks to its small, focused, API. It provides a templating engine with a virtual DOM diff implementation for performant rendering, utilities for high-level modelling via functional composition, as well as support for routing and componentization.

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.

Only 12kb gzipped, no dependencies;Small API, small learning curve;Safe-by-default templates;Hierarchical MVC via components;Virtual DOM diffing and compilable templates;Intelligent auto-redrawing system
Write less code; No virtual DOM; Truly reactive
Statistics
GitHub Stars
-
GitHub Stars
84.6K
GitHub Forks
-
GitHub Forks
4.7K
Stacks
89
Stacks
1.7K
Followers
79
Followers
1.6K
Votes
86
Votes
502
Pros & Cons
Pros
  • 16
    Lightweight
  • 12
    Faster than React
  • 10
    Pure JavaScript
  • 10
    Virtual Dom
  • 8
    Robust
Cons
  • 1
    Virtual Dom
Pros
  • 59
    Performance
  • 41
    Reactivity
  • 36
    Components
  • 35
    Simplicity
  • 34
    Javascript compiler (do that browsers don't have to)
Cons
  • 3
    Event Listener Overload
  • 2
    Complex
  • 2
    Learning Curve
  • 2
    Hard to learn
  • 2
    Little to no libraries
Integrations
TypeScript
TypeScript
JavaScript
JavaScript
No integrations available

What are some alternatives to Mithril, Svelte?

jQuery

jQuery

jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.

AngularJS

AngularJS

AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you use good old HTML (or HAML, Jade and friends!) as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly. It automatically synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data binding.

React

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.

Vue.js

Vue.js

It is a library for building interactive web interfaces. It provides data-reactive components with a simple and flexible API.

jQuery UI

jQuery UI

Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.

Ember.js

Ember.js

A JavaScript framework that does all of the heavy lifting that you'd normally have to do by hand. There are tasks that are common to every web app; It does those things for you, so you can focus on building killer features and UI.

Backbone.js

Backbone.js

Backbone supplies structure to JavaScript-heavy applications by providing models key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.

Angular

Angular

It is a TypeScript-based open-source web application framework. It is a development platform for building mobile and desktop web applications.

Aurelia

Aurelia

Aurelia is a next generation JavaScript client framework that leverages simple conventions to empower your creativity.

Flux

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.

Related Comparisons

Bootstrap
Materialize

Bootstrap vs Materialize

Laravel
Django

Django vs Laravel vs Node.js

Bootstrap
Foundation

Bootstrap vs Foundation vs Material UI

Node.js
Spring Boot

Node.js vs Spring-Boot

Liquibase
Flyway

Flyway vs Liquibase