官术网_书友最值得收藏!

Removing values from lists

If you know the index of the list value that you want to remove, you can pass the index to the remove() method to create a new list without the removed value, as follows:

const myList = List.of(1, 2, 3);
const myChangedList = myList.remove(0);

console.log('myList', myList.toJS());
// -> myList [ 1, 2, 3 ]
console.log('myChangedList', myChangedList.toJS());
// -> myChangedList [ 2, 3 ]

You can see here that myChangedList results from calling remove(0). It's a new list, without the first value.

主站蜘蛛池模板: 钟山县| 溧水县| 萝北县| 潞城市| 吴堡县| 六枝特区| 丰顺县| 建湖县| 通海县| 宝丰县| 彩票| 汝阳县| 浪卡子县| 方城县| 师宗县| 苏尼特左旗| 屯门区| 沂源县| 孟村| 翁牛特旗| 大方县| 紫阳县| 贵德县| 视频| 鲜城| 乡宁县| 女性| 黔南| 浑源县| 盐山县| 合肥市| 松阳县| 鄂伦春自治旗| 昭苏县| 华池县| 绥德县| 柳州市| 昌乐县| 白山市| 玛曲县| 双桥区|