我已经使用Zustand创建了以下商店: import create from "zustand"
show: false下面有一条红色的弯弯曲曲的线,并带有以下错误消息: Property 'show' does not exist on type 'object'.ts(2339)
any 你知道为什么我会收到这个错误信息,以及我如何使用Zustand
import create from 'zustand'import { create } from 'zustand'Module '"zustand"'Did you mean to use 'import create from "zustand"' instead?
编辑:我知道要正确导入create函数需要做些什么。
*我已经在react应用程序中创建了两个Zustand存储,一个称为UserStore,另一个称为SettingsStore,我如何才能从UserStore到SettingsStore获得状态?import create from 'zustand';
我想在另一个名为SettingsStore的商店中使用这个"user“变量
import create from 'zustand'
event.value) // this sets sortBy console.log(sortBy) // this is the zustandtwo // event.value
one // the in-scope zustand variable sortBy as a read after the set 当切换到select上的我认为zustand状态变量应该是一致的(特别是当
场景:用户在表单中输入单个包数据,然后单击按钮将其保存到内存中(状态,由Zustand Immer管理)。对象然后添加到订单列表(数组)中,然后可以在将其发送到后端之前向该列表添加更多的包。import create from "zustand";import { SingleParcel } from "..parcelDestinationAreaCode: number | undefined;
parcelDestinationC