- Mastering Immutable.js
- Adam Boduch
- 179字
- 2021-07-08 10:30:03
A collections API
A collection in JavaScript refers to anything that can be iterated over, for example, when using a for..of loop. In practice, this means arrays and objects. Arrays and objects are collections of values; the only difference between them is how you look up values. An array is an indexed collection, because you use a numerical index to lookup a value. An object is a keyed collection, because you use a key string to lookup a value.
The issue with these primitive JavaScript collection types is that they can change; that is, they're not immutable. The collections exposed by Immutable.js feel a lot like native arrays and objects. In fact, you can take an array or an object and use it to construct an Immutable.js collection. You can also turn an Immutable.js collection into a JavaScript array or object.
This is the extent of the Immutable.js API. You use collection classes to hold your immutable data. To use this immutable data, you call methods on these collections, which is at the very heart of the Immutable.js API.
- Spring 5.0 Microservices(Second Edition)
- Implementing Modern DevOps
- Visual FoxPro程序設計教程
- Learning RabbitMQ
- HTML5游戲開發案例教程
- FFmpeg入門詳解:音視頻原理及應用
- Android Native Development Kit Cookbook
- Scala編程實戰(原書第2版)
- 動手學數據結構與算法
- 現代C++編程實戰:132個核心技巧示例(原書第2版)
- C++20高級編程
- Access 2010中文版項目教程
- Java程序設計案例教程
- Getting Started with Python and Raspberry Pi
- Photoshop智能手機APP界面設計