Get Advice Icon

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

Mithril
Mithril

54
46
+ 1
80
Preact
Preact

75
84
+ 1
20
Add tool

Mithril vs Preact: What are the differences?

Developers describe Mithril as "Client-side MVC framework - a tool to organize code in a way that is easy to think about and to maintain". 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. On the other hand, Preact is detailed as "A fast 3k React alternative". Preact is an attempt to recreate the core value proposition of React (or similar libraries like Mithril) using as little code as possible, with first-class support for ES2015. Currently the library is around 3kb (minified & gzipped).

Mithril and Preact are primarily classified as "Javascript MVC Frameworks" and "Javascript UI Libraries" tools respectively.

"Lightweight" is the primary reason why developers consider Mithril over the competitors, whereas "Lightweight" was stated as the key factor in picking Preact.

Mithril and Preact are both open source tools. It seems that Preact with 23.1K GitHub stars and 1.21K forks on GitHub has more adoption than Mithril with 11.3K GitHub stars and 863 GitHub forks.

Resource Guru, Bustle, and VN2RAP are some of the popular companies that use Preact, whereas Mithril is used by Cloud Vlts, Inc., Dial Once, and SpartanGeek. Preact has a broader approval, being mentioned in 9 company stacks & 4 developers stacks; compared to Mithril, which is listed in 5 company stacks and 5 developer stacks.

What is Mithril?

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.

What is Preact?

Preact is an attempt to recreate the core value proposition of React (or similar libraries like Mithril) using as little code as possible, with first-class support for ES2015. Currently the library is around 3kb (minified & gzipped).
Get Advice Icon

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

Why do developers choose Mithril?
Why do developers choose Preact?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con
      Be the first to leave a con
      What companies use Mithril?
      What companies use Preact?

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

      What tools integrate with Mithril?
      What tools integrate with Preact?

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

      What are some alternatives to Mithril and Preact?
      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鈥檚 syntax to express your application鈥檚 components clearly and succinctly. It automatically synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data binding.
      Vue.js
      It is a library for building interactive web interfaces. It provides data-reactive components with a simple and flexible API.
      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 2
      It is a TypeScript-based open-source web application framework. It is a development platform for building mobile and desktop web applications.
      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.
      See all alternatives
      Decisions about Mithril and Preact
      Dmitry Mukhin
      Dmitry Mukhin
      at Uploadcare | 22 upvotes 256.8K views
      atUploadcareUploadcare
      Django
      Django
      Python
      Python
      React
      React
      Ember.js
      Ember.js
      Preact
      Preact
      PostCSS
      PostCSS

      Simple controls over complex technologies, as we put it, wouldn't be possible without neat UIs for our user areas including start page, dashboard, settings, and docs.

      Initially, there was Django. Back in 2011, considering our Python-centric approach, that was the best choice. Later, we realized we needed to iterate on our website more quickly. And this led us to detaching Django from our front end. That was when we decided to build an SPA.

      For building user interfaces, we're currently using React as it provided the fastest rendering back when we were building our toolkit. It鈥檚 worth mentioning Uploadcare is not a front-end-focused SPA: we aren鈥檛 running at high levels of complexity. If it were, we鈥檇 go with Ember.js.

      However, there's a chance we will shift to the faster Preact, with its motto of using as little code as possible, and because it makes more use of browser APIs. One of our future tasks for our front end is to configure our Webpack bundler to split up the code for different site sections. For styles, we use PostCSS along with its plugins such as cssnano which minifies all the code.

      All that allows us to provide a great user experience and quickly implement changes where they are needed with as little code as possible.

      See more
      Riderman De Sousa Barbosa
      Riderman De Sousa Barbosa
      Front-end Developer | 5 upvotes 16.6K views
      atmeve.aimeve.ai
      Preact
      Preact
      React
      React

      The first and most important premise is that should be fast.. really fast. This premise was basically because this is an PWA project, and the main goal of this project are be more efficient on restaurant.

      So I ended up choosing Preact instead React .

      This made the app (PWA) more faster, not only when navigating but improve TTI and data usage.

      See more
      Interest over time
      Reviews of Mithril and Preact
      No reviews found
      How developers use Mithril and Preact
      No items found
      How much does Mithril cost?
      How much does Preact cost?
      Pricing unavailable
      Pricing unavailable
      News about Mithril
      More news
      News about Preact
      More news