paint-brush
The React is dead. Long live the React!by@vladimirmetnew
6,878 reads
6,878 reads

The React is dead. Long live the React!

by Vladimir MetnewAugust 18th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

<em>Let’s find the best “React-like” library and don’t become a next victim of Facebook’s “patent wars”. Or probably become&nbsp;.</em>

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - The React is dead. Long live the React!
Vladimir Metnew HackerNoon profile picture

WARNING: This post is OUTDATED. React is MIT licensed now.

Let’s find the best “React-like” library and don’t become a next victim of Facebook’s “patent wars”. Or probably become .

Intro

TL;DR: Facebook can use own open-source libraries as a weapon in patent wars.

From official Facebook explanation:

The patent grant says that if you’re going to use the software we’ve released under it, you lose the patent license from us if you sue us for patent infringement.

It’d better read the official FB response, the original issue in React repo and this post explaining all the things.



UPD: After reading some tweets/info I figured out that there is some kind of “black magic” with patents. FB has to disclose patents connected to React to remove these restrictions. And it seems that all “React-like” libraries are patented too, because they are derivates of original React. I guess, FB has patent on “component-based” model or something similar. I’m not a lawyer, that’s just my assumption.UPD2: yet another assumption.UPD3: Also, it’s strange why this conflict has become popular only in last few days. Posts explaining FB license appeared more than one year ago.

Next Heroes

Vue.js(MIT license), Angular(MIT license), Riot(MIT license), Ember(MIT license) and other frameworks are awesome, but we consider only “React-like” libraries that ship well-known “component-based” paradigm, have (almost) the same API, JSX support and already have a feedback from community.

Preact (MIT license)

Fast 3kb React alternative with the same ES6 API. Components & Virtual DOM.


developit/preact_preact — ⚛️ Fast 3kb React alternative with the same ES6 API. Components & Virtual DOM._github.com

Everyone knows Preact. If you don’t know what is Preact, then read this simple equation:

Preact + “preact-compat” = React

Yeah, you still can work with React using Preact and [preact-compat](https://github.com/developit/preact-compat). Probably, you even don’t need preact-compat, because Preact already has own libraries like [preact-router](https://github.com/developit/preact#libraries--add-ons). Preact has a big support from the community, many examples, libraries and addons.

Inferno(MIT license)

An extremely fast, React-like JavaScript library for building modern user interfaces


infernojs/inferno_inferno — An extremely fast, React-like JavaScript library for building modern user interfaces_github.com

Inferno is really fast. And guess, why we should like Inferno? Yes, because it’s a modern fast lightweight library + because of this simple equation:

Inferno + Inferno-compat = React

There are some key differences between Inferno and Preact:

  1. Unlike React and Preact, Inferno has lifecycle events on functional components
  2. Inferno’s server-side rendering is around 5x faster than React, around 3x faster than Angular 2 and around 1.5x faster than Preact and Vue.
  3. Unlike Preact and other React-like libraries, Inferno has controlled components for input/select/textarea elements

Probably, I’ll select Inferno for my next (React) project.

Deku(MIT license)

Render interfaces using pure functions and virtual DOM


anthonyshort/deku_deku — Render interfaces using pure functions and virtual DOM_github.com

Great description from official docs:

Instead of using classes and local state, Deku just uses functions and pushes the responsibility of all state management and side-effects onto tools like Redux. It also aims to support only modern browsers to keep things simple.

From my own experience: It’s even better to rely on Flux/Redux instead of using component’s state.

There are also Rax(BSD-3 license: FB + Alibaba), Bobril, DIO, Imba, vidom and other libraries, frameworks, addons with similar API, but they’re not so popular.



Thanks for reading this article 😈Github: @MetnewTwitter: @theMetnew