How to use the setIn function from immutable
Find comprehensive JavaScript immutable.setIn code examples handpicked from public code repositorys.
GitHub: Alercard/mba-foda
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 }
0
0
0
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;
0
0
0
immutable.Map is the most popular function in immutable (1575 examples)