适用于Vue的Saga替代品 [英] Saga alternative for Vue

查看:435
本文介绍了适用于Vue的Saga替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完成了Vue.js的学习,它几乎就是我想要的!
但我找不到类似于redux-saga的东西。这是一个非常棒的工具,拥有这样的东西会很棒。

I finished learning Vue.js, it has had almost all I wanted from it! But I can't find something similar to redux-saga. It was a very great tool, and it would be nice to have something like this.

有人可以建议替代库,或分享如何管理具有复杂数据流的大型项目而无需使用redux-saga

有人试图将Redux-saga连接到Vue并使用它(例如,使用那个库)?
有什么经历?

Did someone try to connect Redux-saga to Vue and use it (e.g. with that library)? What was the experience?

推荐答案

遇到同样的问题。我创建了一个名为 vuex-coolstory 的新软件包,因为其他软件包已过时。

Have the same problem. I created new package called vuex-coolstory cause other packages is outdated.

另外,我没有使用vuex动作来发送传奇行为。我为此创建了新函数 store.sagaDispatch() mapSagaActions()辅助函数。
我不得不停止对传奇动作使用vuex动作,因为我必须在商店中定义它们。并且会有很多未使用的空函数。如果您未在商店中定义它,则每次发生操作时都会出现vuex打印错误消息。

Plus I did not use vuex actions to dispatch saga actions. I created new function store.sagaDispatch() and mapSagaActions() helper function for that. I had to stop using vuex actions for saga actions, cause I must define them in store. And there are will be a lot unused empty functions. If you not define it in store, vuex print error message every time when you dispact action.

这篇关于适用于Vue的Saga替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆