Skip to content

Commit 598f7e6

Browse files
mistyharshregou
authored andcommitted
Documentation of v-stream for custom events (#76)
1 parent 6c0d09a commit 598f7e6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,20 @@ Starting in 3.1 you can also pass along extra options (passed along to native `a
151151

152152
See [example](https://github.com/vuejs/vue-rx/blob/master/example/counter.html) for actual usage.
153153

154+
### `v-stream`: Streaming Custom Events from Child Components
155+
156+
Starting in 3.2, similar to streaming `DOM` events, `v-stream` can be used on components as well and will create observables from custom events emitted by the child component. It works similar to `v-on`:
157+
158+
```html
159+
<div>
160+
<!-- Custom component -->
161+
<pagination v-on:change="pageChanged()"></pagination>
162+
163+
<!-- v-stream with custiom component -->
164+
<pagination v-stream:change="pageChange$"></pagination>
165+
</div>
166+
```
167+
154168
### Other API Methods
155169

156170
#### `$watchAsObservable(expOrFn, [options])`

0 commit comments

Comments
 (0)