如果你学过Angular或者熟悉函数式编程,你可能对 RxJs 实现的 Observable 概念十分熟悉。本文是在Vue中使用RxJS的快速预览。 If you come from Angular-land or are a fan of functional programming, you’re probably pretty familiar with the concept of observable streams, as implemented most commonly in JS-land by RxJS. Here’s a quick guide on using RxJS with Vue.
现在,可能不像其他框架一样,RxJS拥有官方插件支持 -- vue-rx,它满足了所有的需求。 Now, Vue doesn’t come with RxJS support out-of-the-box like other frameworks might, but it does provide an official plugin, vue-rx that adds the needed bindings.
为了使用它,你需要先用 Yarn 或 NPM 安装 vue-rx。