Sha256: 05ab6bad50363678e2c14684d16d023faff6ea93a9f7757cfdb2c592577e47d6
Contents?: true
Size: 433 Bytes
Versions: 1
Compression:
Stored size: 433 Bytes
Contents
export default (state = [], action) => { switch (action.type) { case "ADD_ARTICLES": return [...state, ...action.payload.articles]; case "SET_ARTICLES": return [...action.payload.articles]; case "UPDATE_ARTICLE": return [ ...state.slice(0, action.payload.index), action.payload.article, ...state.slice(action.payload.index + 1) ]; default: return state; } };
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
loco-rails-3.0.4 | test/dummy/frontend/js/reducers/main/articles.js |