Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 111: The Spread Operator (...)
Implement `updateFromEvent(state, event)` where `event` looks like `{ target: { name, value } }`, returning new state with that field updated. This mirrors a React onChange handler.
+ 1 hidden test run on Submit.
Destructuring { name, value } from event.target and returning { ...state, [name]: value } is exactly how a shared React onChange handler updates the right field.
Run your code to see results.