Top trending niche JS frameworks for 2021
Being a niche product has little to do with popularity. It is often more about specialization, about meeting a specific need and doing it just a little bit better than the market leader. So, it is possible to be quite popular but still be considered niche.
And that is how it is with many JS frameworks. Sure, Angular and React might dominate the conversation, but neither is always the right choice. From frameworks that touch on every aspect of your app or website, to some that are really good at one specific task, niche JS frameworks are worthy of consideration.
JS frameworks – usage ranking
JS frameworks – satisfaction ranking
Rich Harris, the creator of Svelte, has stated that developers will write less code with his framework, while also being able to use features not supported by more popular frameworks. It also supports incremental adoption, so developers can gradually introduce Svelte into their projects.
And while the Svelte community is still relatively small, the development of the framework is far from slow. The first version of Svelte was released in 2016, with Version 3–which saw the framework switch to being written in TypeScript–released less than three years later. Aside from being used at The New York Times, Svelte is also being used in point-of-sale devices, Smart TV apps, and dozens of other apps around the world.
Technically, LitElement is a library, not a framework. But regardless of the framework you have used for your web app, there is a good chance you will need to use web components. And being framework-agnostic, LitElement is a great way to build your web components.
The developers of LitElement–the same team responsible for Polymer–describe it as
a lightweight base class that makes it easier than ever to build and share Web Components.
Being lightweight is important if you are already using a lightweight framework and don’t want to add any heft to it. But this also translates into web components that are fast, and with a familiar syntax, also fast to write.
And like LitElement it is lightweight. But that means you are limited to only 20 built-in directives and properties. If all you are looking for is a little bit of styling, and are already familiar with Vue.js and Angular, Alpine.js could be just what you need. Without having to worry too much about any size and performance impact.
Alpine.js has only been around since the end of 2019, but the development of the framework is very active.
It’s designed to augment your HTML with just enough behavior to make it shine.
Stimulus is developed and maintained by the team behind Basecamp and the HEY email service. And they use it in their own apps. Which hints at its versatility and assures you of ongoing development. The first public release was at the start of 2018, with v2.0.0 coming just two years later.
the Guild Wars 2 website, and multiple elements within Guild Wars 2 itself. The game launcher, the real-money store, the currency exchange, the trading post, and all of the Guild Hall management UI. Anything that was done with web tech we wrote in Mithril.
The reason for this JS framework sounding so similar to React is because it aims to offer the same features, without the large overhead. So, if you are already familiar with React, adapting to Preact won’t be challenging.
With a bundle size of only 3.5 kB, Preact is small, though achieving this size does mean doing some things differently to React. And this can result in Preact being slightly slower than React with some functions. However, this shouldn’t be a reason to avoid Preact, especially for smaller projects that would benefit from a compact framework.
The development of Preact is very active, moving from an initial release in 2015 to Preact X just four years later. Though adding and improving features and functions has not come at the expense of the framework’s size or performance. Uber, Lyft, and Tencent’s QQ are just a few brands and apps that have used Preact in their projects.
Hyperapp is another tiny framework–with a footprint of between 1.9 kB and 4.3 kB–and lends itself well to a variety of web interface implementations. The versatility of the framework can be seen at this curated list of live Hyperapp projects that include everything from a Twitch extension to a Tetris and Minesweeper game. Although influenced by The Elm Architecture, the framework will still feel familiar–or easy to adapt to–for anyone comfortable using React and Vue.
Although, like the other frameworks discussed here, it is supported by an active community, development is a little slower. A pre-release for Version 2 was published in 2019, but as of writing this the official release is still some way off with little in the way of comprehensive supporting documents available for this major update either.