Mastering Immutable.js
上QQ阅读APP看书,第一时间看更新

Lodash is a good bet

Lodash is a popular utility library that does a lot of the same things as Immutable.js. It supports the notion of immutability and avoids side-effects. It also supports the concept of collections. Its approach to efficiency is different from what Immutable.js does, but it's there. It might have a larger API than Immutable.js, but it's not that much larger.

The two libraries differ greatly in their overall approach and design, but they're comparable in the aspects that matter. Learning Lodash before switching to Immutable.js isn't a total loss and vice versa. You won't know which libraries work best for you until you write code that uses them.

We'll start writing Immutable.js code in a moment.