需要处理巨大的状态物体,最好继续Zustand
有了许多国家管理库,很难选择一个。从我经历的文章中,Zustand似乎是一个简单而强大的状态管理库,避免了更新状态并维护状态涉及的不必要的复杂性。
只想交叉检查,如果要继续进行一个好主意,可以处理一个巨大的状态对象和任何最佳实践来处理它。
提前致谢。
With a lot of state management libraries available, it's becoming hard to choose one. From the articles I have gone through, looks like Zustand is a simple and powerful state management library that avoids unnecessary complexity involved in updating the state and maintaining it.
Just want to cross-check, if it is a good idea to go ahead with it, to handle a huge state object and any best practices to handle it.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只是遇到了一个试图在Zustand中存储一系列复杂对象(TIPTAP编辑器)数组的性能问题,当将其转入Pline React上下文时,我建议您避免在Zustand中存储任何超大的东西。
Having just run into a performance issue trying to store an array of complex objects (Tiptap editors) in zustand, that when moved out into plain react context was fine, I'd advise avoiding storing anything super large in zustand.