Skip to content

Commit b9f6144

Browse files
committed
readme y version
1 parent 0da8f3f commit b9f6144

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,29 @@ var vm = new Vue({
241241
})
242242
```
243243

244+
#### `$createObservableFunction(functionName)`
245+
246+
> This feature requires RxJS.
247+
248+
Convert function calls to observable sequence which emits the call arguments.
249+
250+
This is a prototype method added to instances. Use it to create a shared hot observable from a function name. The function body will assigned to vm.
251+
252+
```html
253+
<custom-form :onSubmit="submitHandler"></custom-form>
254+
```
255+
``` js
256+
var vm = new Vue({
257+
subscriptions () {
258+
return {
259+
formData: this.$createObservableFunction('submitHandler')
260+
}
261+
}
262+
})
263+
```
264+
[example](https://github.com/vuejs/vue-rx/blob/master/example/counter-function.html)
265+
266+
244267
### Caveats
245268

246269
You cannot use the `watch` option to watch subscriptions, because it is processed before the subscriptions are set up. But you can use `$watch` in the `created` hook instead.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-rx",
3-
"version": "3.2.0",
3+
"version": "3.3.0",
44
"description": "RxJS bindings for Vue",
55
"main": "dist/vue-rx.js",
66
"files": [

0 commit comments

Comments
 (0)