Mithril is a client-side JavaScript framework that is used primarily in developing the Single Page Applications. As there are no derived functions from a base class, the implementation of the framework is more straightforward. It's small (< 8kb gzip), fast and provides routing and XHR utilities out of the box. It has a few features similar to React.
Key Features:
- Built-in Utilities: Unlike many other small frameworks, it includes routing and XHR (HTTP requests) utilities out of the box, reducing the need for external libraries.
- Virtual DOM: It uses a high-performance Virtual DOM implementation to efficiently update the UI.
- Small API Surface: Its API is minimal and relies heavily on plain JavaScript, leading to a shallow learning curve for those familiar with the language.
- No Build Tool Required: While it supports JSX (via Babel), it is idiomatic to write views using Hyperscript (m() functions), which allows you to build applications without a complex build pipeline.
Use Cases and Adoption:
Performance-Critical Apps: Due to its speed and small footprint, it is used by platforms like Lichess (a popular open-source chess server).
Enterprise Use: Companies such as Vimeo and Nike have utilized it in their tech stacks.
Browser Support: It supports modern browsers and remains compatible back to IE11 without requiring polyfills.
Getting Started:
You can install it via npm or use a CDN for quick prototyping:
NPM: npm install mithril --save
Playground: Test the framework instantly at flems.io/mithril.
Official Mithril.js website.
Source:
- https://news.ycombinator.com/item?id=43550317
- https://www.numendo.com/blog/framework/mithril-js/
No comments:
Post a Comment