- 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.
- Python快樂編程:人工智能深度學習基礎
- C語言程序設計(第2 版)
- Learning RxJava
- Bulma必知必會
- Functional Programming in JavaScript
- 假如C語言是我發明的:講給孩子聽的大師編程課
- TypeScript圖形渲染實戰:基于WebGL的3D架構與實現
- Python機器學習經典實例
- PhpStorm Cookbook
- Mastering Apache Maven 3
- Learning DHTMLX Suite UI
- AIRIOT物聯網平臺開發框架應用與實戰
- Node.js:來一打 C++ 擴展
- C# Multithreaded and Parallel Programming
- Visual Studio Code 權威指南