From d03859c220fc9833e70c5671cf4f18db3b7d8b5d Mon Sep 17 00:00:00 2001 From: James Greenaway Date: Tue, 29 Jan 2019 12:05:56 +0000 Subject: [PATCH] Add some dummy epic code --- src/index.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index afdbd59..3d1acfa 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -51,6 +51,29 @@ setTimeout(() => workloadService.checkStatus({ id: 2 }) .then(console.log.bind(console, 'checkStatus 2')), 200); +/* +// pretend epic code + +function createWorkload(action$) { + action$ + .pipe( + ofType('WORKLOAD_SUBMIT'), + tap((action) => { + console.log(`workload has been submitted with complexity of ${action.payload.complexity}`) + }), + switchMap((action) => ( + fromPromise(workloadService.create({ complexity: action.payload.complexity })) + )), + map((response) => ( + WorkloadActions.created(response)) + )) + ); + + return empty(); +} +*/ + + ReactDOM.render( (