List

Using List is no different from using Map, from immutable JS. The only thing to note is that it is equivalent to the array in normal JavaScript. Study its usage in the following example:

 import { List  } from 'immutable';
// Normal Javascript
const telecom = [
{
"use": "phone"
},
{
"system": "phone",
"value": "(47) 94430047",
"use": "work",
"rank": 1
},
{
"system": "phone",
"value": "(47) 94430045",
"use": "mobile",
"rank": 2
},
{
"system": "phone",
"value": "(47) 94430044",
"use": "old",
"period": {
"end": "2017"
}
}
];

// To create the equivalent in Immutable:
const immutablePerson = List(telecom);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset