从包装更改应用程序状态的最佳实践

发布于 2025-01-28 08:54:33 字数 225 浏览 5 评论 0原文

我正在开发一个独立的软件包,该软件包当前在这样的应用程序中:app/packages/my_package 我使用创建命令软件包模板创建了软件包。

我想实现的是在某些事件中触发应用程序中的状态变化,例如,在听流并获取特定对象(在软件包中)时,我想触发应用程序中的某些状态变化,例如,让它知道它可以停止加载并“传递”读取对象。

我觉得有几种实施此操作的方法,您能为这种情况提出一些好的方法和州管理工具/技术吗?

I'm developing a standalone package which is currently inside an app like this: app/packages/my_package
I created the package with the create command package template.

What I'd like to achieve is to trigger state changes in the app from package during some events, for example while listening to a stream and getting a specific object (in the package) I'd like to trigger some state change in the app,, for example let it know that it can stop loading and "pass" the read object.

I have a feeling that there are several ways to implement this, can you suggest some good approaches and state management tools/techniques to for this scenario?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文