I have an immutable list object in an object Mapas follows:
Map
let initialState = Immutable.fromJS({}); state = initialState; state = state.set("myList", Immutable.List());
How to add value to "myList", thereby updating state?
state
You can use the update () method .
const initialState = Immutable.fromJS({}); const state = initialState.set('myList', Immutable.List()); const updatedState = state.update('myList', myList => myList.push('some value'));
Source: https://habr.com/ru/post/1660689/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1660684/phplaravel-repository-pattern-proper-logic-in-creating-complex-objects&usg=ALkJrhj1-L275v9zS05sKF-Oig8RX0CchwAndroid How to set multiple gravity values programmatically in Kotlin? - androidAngular2 - не смотреть в 'node_modules' для конкретного модуля - angular, column имеет тип jsonb, но выражение имеет тип text [] - arraysTensorflow: Do TFRecords generated files always have a larger file size than the original data? - pythonHow to get a list of files to commit using JGit - javaAjax.BeginForm Handling two different answers onSuccess, MVC 5, C # - javascriptПолучение ошибки - объект AttributeError: 'module' не имеет атрибута 'run' при запуске subprocess.run([ "ls", "-l" ]) - pythonDisplay wide characters with printf - cCreating a universal method for generating expressions in C # - reflectionAll Articles