When comparing Vue.js vs Inferno, the Slant community recommends Vue.js for most people. In the question“What are the best JavaScript libraries for building a UI?” Vue.js is ranked 1st while Inferno is ranked 15th. The most important reason people chose Vue.js is:
Vue can easily be integrated with other front-end libraries. This makes it an extremely versatile tool and it's easy to fix its shortcomings or missing features by just plugging in another library.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Can be used with any front-end stack
Vue can easily be integrated with other front-end libraries. This makes it an extremely versatile tool and it's easy to fix its shortcomings or missing features by just plugging in another library.
Pro Single file component
Very useful.
Pro Lightweight
Vue.js weighs in at 16kb min+gzip.
Pro Vuex store, events system
Pro Reactivity system
Pro CLI and Webpack integration
Pro Responsive server-side rendering
Since most of the mainstream server-side rendering implementations are synchronous, they can block the server's event loop when the application is complex.
Vue implements streaming server-side rendering, which allows you to render your component, get a readable stream and directly pipe that to the HTTP response. This allows you to have a responsive server and decreases the time your users have to wait before they get your rendered content.
Pro Supports inline templating
Although you can build components in JavaScript files, you can also use inline handlebars-like templating in your HTML views where simplicity is often a more sane choice.
Pro Can be made even lighter
Since the template-to-virtual-DOM and compiler can be separated, you can compile the templates in your machine and then deploying only the interpreter which is 12KB minified and gzipped.
Pro Support for both templates and JSX
You can choose to use either a templating language, or if you feel it's necessary to drop on a lower virtual-dom level, you can use JSX. This is simply done by replacing the template
option with a render
function.
Or alternatively, you can embed functions inside templates by using the <render>
tag.
Pro SEO friendly
Starting with Vue 2.0, Vue supports server-side rendering. This helps with SEO a lot, since the views are rendered directly on the server, which are indexed by search engines.
Pro VueRouter
Pro Modular
Use it however you want in a framework of your own custom design. When things change in the industry, swap things out instead of being locked in by someone else's design.
Pro Pretty light-weight
Inferno weighs in at 9kb gzipped, which is light-weight.
Pro Fast performance
Inferno is one of the fastest UI libraries around and widely considered the fastest.
Pro React compatability
Using the Inferno compatibility package ("inferno-compat"), Inferno can support the vast majority of React codebases.
Cons
Con Poor typescript support
Very basic typescript support.
Con Very enterpris-ey in design and tooling
Con Some React components may not work with Inferno
Inferno and React have different public and private APIs. If 3rd party components use a private API then it's almost certainly going to break when you use it with Inferno.
Once React Fiber is implemented, even libraries that are currently working will break and will not be supported by Inferno.
Con Not very popular
Which can hinder one's opinion of its future, but the future of all "frameworks" is to break things into smaller pieces, so inferno very well might get used by the big names in the future.