Skip to content

Commit 31e408a

Browse files
authored
Update index.js
1 parent 3847670 commit 31e408a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

examples/loading-plugin/src/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { from } from 'rxjs';
2-
import { mergeMap } from 'rxjs/operators';
31
import loading from '@rxloop/loading';
42
import rxloop from '../../../src';
53

@@ -39,10 +37,10 @@ const counter = {
3937
}),
4038
);
4139
},
42-
getData(action$, { map }) {
40+
getData(action$, { call, map }) {
4341
return action$.pipe(
44-
mergeMap(() => {
45-
return from( apiSlow() );
42+
call(async () => {
43+
return await apiSlow();
4644
}),
4745
map((data) => {
4846
return {

0 commit comments

Comments
 (0)