Context.Privider无法更新反应

问题描述

我已经创建了一个上下文,并且值是一个具有有限数量属性的对象。

    <Context.Provider value={contextValue}>
      <div>
        <input type="text" placeholder="Rechercher un plat" value={search} onChange={updateSearch} />
        <ul>
          {filteredOrder.map((order,i) => {

            return <SelectOrder key={i} index={i} />;
          })}
        </ul>
      </div>
    </Context.Provider>
```

Here is my component for update or delete quantity. But it work only with my hooks. It doesn't work for updating the context value.

I want to past a object in value of context avec update this context in an other component where I have 2 button. One for add and an other for delete quantity

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)