I have 2 states, but both are updating even though I only setState one of them

前端 未结 0 1036
忘掉有多难
忘掉有多难 2021-01-25 12:44

Problem

using React, I have a meal, which has an array of ingredients

const [meal, setMeal] = useState()

    meal = {
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题