Comments (6)
released 2.0.0.
from vue-rx.
I'm not sure why RxJS has to be integrated in such a cloaked way by Vue (is there some benefit I'm not aware of)? RxJS is what it is, just another API, a utility that can be imported and used where it and it's wonderful operators might find a usage.
Integrating RxJS as a Vue Directive would be better. Then in the directives handler you can use RxJS to it's maximum benefit. I just saw the following awesome article where the Pointer-Events API was integrated into Vue via a Directive. The same integration could be done for RxJS.
https://benjaminlistwon.com/blog/strategies-for-extending-vue
The RxJS API should be just like Lodash or any other API, just an option one is free to use in component method, computed or watch functions.
from vue-rx.
@zoomclub RxJS may be used to handle either DOM events or back-end socket.io data push. If you are using Vue, I don't think RxJS is quite useful for DOM handling, since Vue (as a view tool) already has plenty of gadgets to interact with the DOM. But Vue doesn't provide any model or back-end data tools. That's where RxJS can help. I usually use this plugin to link socket.io data push from back-end and vue in the front-end.
from vue-rx.
@beeplin Still need a way to turn DOM events into a stream/observable in Vue component template. A directive would essentially just wrap the following RxJS operator:
http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#static-method-fromEvent
<div v-rxjs:event-type=โhandlerโ>
would be nice, because RxJS offers something unique.
from vue-rx.
I think it might be better if we change the API to use a separate option instead:
data () {
// normal state
return { ... }
},
rx: {
key: someObservable$
},
This more explicitly separates observables vs. normal state, and solves the issue you are running into.
from vue-rx.
@yyx990803 sure, that would be great. :)
from vue-rx.
Related Issues (20)
- v-stream data is not being updated in componentInstance HOT 2
- Can't use `subscriptions` as an object. HOT 2
- [help wanted] using vue-rx in component package/plugin HOT 3
- vue renderes before observable HOT 1
- $fromDOMEvent ้ฎ้ข
- Vue Composition API and vue-rx HOT 12
- Created hook called multiple times HOT 4
- How do we use this library with vue3 alpha 8? HOT 2
- help me. $watchAsObservable How to execute directly once the page is loaded HOT 1
- Why have a $subscribeTo ? HOT 1
- Typings error for $observables
- How to use vue-rx with vue 3.x ? HOT 2
- using $watchAsObservable, and using throw new Error() watch not work HOT 1
- Is there any support for Vue 3? HOT 1
- Update to Rx.js 7 and adding Typescript? HOT 2
- Cannot resolve dependency in newer npm version HOT 2
- Publish v6.3.0 in npm
- How to init vuerx to vue3 HOT 3
- Remove Vue installation from the readme
- How to solve vue-rx incompatiblity with Vue3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-rx.