- Mastering Immutable.js
- Adam Boduch
- 32字
- 2021-07-08 10:30:08
Lists of values
You can use the of() method to create lists of values as follows:
const myList = List.of(1, 2, 3);
console.log('myList', myList.toJS());
// -> myList [ 1, 2, 3 ]
You can use the of() method to create lists of values as follows:
const myList = List.of(1, 2, 3);
console.log('myList', myList.toJS());
// -> myList [ 1, 2, 3 ]