Course · Section 17: Modern JavaScript Development: Modules, Tooling, and Functional · Lecture 294: Declarative and Functional JavaScript Principles
Implement `todoAddReducer(state, action)` where `state` is an array of todos and an `add` action carries `text`. Append `{ text, done: false }` immutably. Unknown actions return state unchanged.
+ 1 hidden test run on Submit.
For an add action, return a new array spreading the old todos plus the new { text, done: false }. Other actions return the same array reference unchanged.
Run your code to see results.