Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Commit 03c1596

Browse files
author
NOPR9D ☄️
authored
Merge pull request #14 from NOPR9D/20211205_fixissueFixunpkgLin
20211205 remove forceUpdate with mixins | fix unpkg links
2 parents dacc675 + bbbc249 commit 03c1596

File tree

10 files changed

+19
-21
lines changed

10 files changed

+19
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ To use in a browser environment, use the UMD build `dist/vue-next-rx.js`. When i
4545
Example:
4646

4747
```html
48-
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"></script>
48+
<script src="https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js"></script>
4949
<script src="https://unpkg.com/vue@next"></script>
5050
<script src="../dist/vue-next-rx.js"></script>
5151
```

example/createObservableMethod.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- this demo requires a browser that natively supports ES2015 -->
22

3-
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"></script>
3+
<script src="https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js"></script>
44
<script src="https://unpkg.com/vue@next"></script>
55
<script src="../dist/vue-next-rx.js"></script>
66
<div id="app">

example/fromDom.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- this demo requires a browser that natively supports ES2015 -->
22

3-
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"></script>
3+
<script src="https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js"></script>
44
<script src="https://unpkg.com/vue@next"></script>
55
<script src="../dist/vue-next-rx.js"></script>
66
<div id="app">

example/ref.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- this demo requires a browser that natively supports ES2015 -->
22

3-
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"></script>
3+
<script src="https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js"></script>
44
<script src="https://unpkg.com/vue@next"></script>
55
<script src="../dist/vue-next-rx.js"></script>
66
<div id="app">

example/subscribeTo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- this demo requires a browser that natively supports ES2015 -->
22

3-
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"></script>
3+
<script src="https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js"></script>
44
<script src="https://unpkg.com/vue@next"></script>
55
<script src="../dist/vue-next-rx.js"></script>
66
<div id="app">

example/vStream.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- this demo requires a browser that natively supports ES2015 -->
22

3-
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"></script>
3+
<script src="https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js"></script>
44
<script src="https://unpkg.com/vue@next"></script>
55
<script src="../dist/vue-next-rx.js"></script>
66
<div id="app">

example/vStream2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- this demo requires a browser that natively supports ES2015 -->
22

3-
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"></script>
3+
<script src="https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js"></script>
44
<script src="https://unpkg.com/vue@next"></script>
55
<script src="../dist/vue-next-rx.js"></script>
66
<div id="app">

example/watch.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- this demo requires a browser that natively supports ES2015 -->
22

3-
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"></script>
3+
<script src="https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js"></script>
44
<script src="https://unpkg.com/vue@next"></script>
55
<script src="../dist/vue-next-rx.js"></script>
66
<div id="app">

example/watchAsObservable.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- this demo requires a browser that natively supports ES2015 -->
22

3-
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.js"></script>
3+
<script src="https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js"></script>
44
<script src="https://unpkg.com/vue@next"></script>
55
<script src="../dist/vue-next-rx.js"></script>
66
<div id="app">

src/mixin.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,20 @@ export default {
77
const domStreams = vm.$options.domStreams;
88

99
if (domStreams) {
10-
domStreams.forEach(key => {
10+
domStreams.forEach((key) => {
1111
vm[key] = new Subject();
1212
});
1313
}
14-
1514
const observableMethods = vm.$options.observableMethods;
1615
if (observableMethods) {
1716
if (Array.isArray(observableMethods)) {
18-
observableMethods.forEach(methodName => {
17+
observableMethods.forEach((methodName) => {
1918
vm[methodName + "$"] = vm.$createObservableMethod(methodName);
2019
});
2120
} else {
22-
Object.keys(observableMethods).forEach(methodName => {
23-
vm[observableMethods[methodName]] = vm.$createObservableMethod(
24-
methodName
25-
);
21+
Object.keys(observableMethods).forEach((methodName) => {
22+
vm[observableMethods[methodName]] =
23+
vm.$createObservableMethod(methodName);
2624
});
2725
}
2826
}
@@ -34,7 +32,7 @@ export default {
3432
if (obs) {
3533
vm.$observables = {};
3634
vm._subscription = new Subscription();
37-
Object.keys(obs).forEach(key => {
35+
Object.keys(obs).forEach((key) => {
3836
vm[key] = undefined;
3937
const ob = (vm.$observables[key] = obs[key]);
4038
if (!isObservable(ob)) {
@@ -48,11 +46,11 @@ export default {
4846
}
4947
vm._subscription.add(
5048
obs[key].subscribe(
51-
value => {
49+
(value) => {
5250
vm[key] = value;
53-
this.$forceUpdate();
51+
vm = { ...vm };
5452
},
55-
error => {
53+
(error) => {
5654
throw error;
5755
}
5856
)
@@ -65,5 +63,5 @@ export default {
6563
if (this._subscription) {
6664
this._subscription.unsubscribe();
6765
}
68-
}
66+
},
6967
};

0 commit comments

Comments
 (0)