When a user clicks the "Reserve Rocket" button, the action dispatches to update the store. It gets the ID of the reserved rocket and updates the state. It returns a new state object with all rockets.
When a user clicks the "Cancel Reservation" button it sets the reserved key to false and returns the state.
Rockets that have already been reserved display a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve Rocket".
I have done the following:
reserved
key tofalse
and returns the state.