javascript - Returning a map from setIn -- ImmutableJS -
i'm trying return nested value inside setin, way i'm doing now, i'm accessing value need, need map first. immutable provides this, however, need use immutable.map().map(..)
after array. returned value method, doesn't contain values, of should. know way accomplish this?
you need pass iterable immutable.map() constructor, otherwise creating empty map.
it's hard precise without more details, assuming 'result' array of resources , need array of resource ids, should work.
let tempstateid = newstate.setin([populatekey, 'íds'], immutable.map(result).map(resource => resource.id))
Comments
Post a Comment