Concat Vs Spread Syntax
I'm working a codebase where it has lots of inconsistency as it has been worked on by multiple different person. function todos(state = [], action) { switch (action.type) {
Solution 1:
Both, spread syntax and Array.prototype.concat() dont mutate the state, thus respecting the second rule of redux
State is read-only
Post a Comment for "Concat Vs Spread Syntax"