Facebook recently launched Recoil during its annual React conference in Europe as an open source state management library.

It’s designed to:

  1. Be minimal and Reactish.
  2. Tame derived data and asynchronous queries through pure functions and efficient subscriptions.
  3. Carry out cross-app observation and debugging without impairing code-splitting.

To quote Dan Abramov(original author of Redux)back in May 2019:

“First of all, Recoil is only used in a few places. Facebook is a giant codebase (> 100,000 components), you can’t expect some single approach to be used everywhere. There’s a few places using Redux too. But it doesn’t solve the problems Recoil is trying to solve.”

Since then, the popularity of Recoil has dramatically risen. At the time of writing this article, Recoil has gained over 10k+ GitHub stars, is in the top ten weekly trending JS GitHub repos, and its weekly NPM package downloads have trended upwards since its release. This is quite impressive when you consider that the library is still in its experimental phase and considered too unstable for production-level applications.

Note: Facebook has successfully deployed Recoil in production for some of its internal tools.

So then what’s all this hype about? What are those problems that Recoil is trying to solve? And…

#javascript #recoiljs #react #web-development

Recoil.js: The Future of React State Management?
39.40 GEEK