1this.setState(prevState => ({
2 food: {
3 ...prevState.food, // copy all other key-value pairs of food object
4 pizza: { // specific object of food object
5 ...prevState.food.pizza, // copy all pizza key-value pairs
6 extraCheese: true // update value of specific key
7 }
8 }
9}))