Reactjs.
the prevState object, and updates only the place property on the copied object. It then returns a brand-new object: return {...prevState, place: "World-Wide Web"} Everything is wrapped in curly braces so that this new object is built correctly, and it is returned from the call to setGreeting.