How to use the setIn function from immutable

Find comprehensive JavaScript immutable.setIn code examples handpicked from public code repositorys.

52
53
54
55
56
57
58
59
60
61
62
63
        const resp = setIn(state, [typeData], fromJS(updatedFortalezas))
        setData(resp)
        return resp


    }
    const resp = setIn(state, [typeData, ixToUpdate, action.payload.field], action.payload.text)
    setData(resp)
    return resp


}
fork icon0
star icon0
watch icon0

14
15
16
17
18
19
20
21
22
23
  Object.keys(data.notifications).map((key) => {
    data.notifications[key].isRead = false;
  });
  return state.merge(data);
case MARK_AS_READ:
  return setIn(state, ['notifications', String(action.index), 'isRead'], true);
case SET_TYPE_FILTER:
  return state.set('filter', action.filter);
default:
  break;
fork icon0
star icon0
watch icon0