Skip to content

Commit f636314

Browse files
committed
refactor: remove middle in basic example
1 parent eb15975 commit f636314

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

app/examples/Basic/store.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
import { configureStore, createSlice, Middleware } from '@reduxjs/toolkit';
1+
import { configureStore, createSlice } from '@reduxjs/toolkit';
22

3-
import { workflowManagerReducer, WorkflowManagerConfig } from '../../../dist';
4-
import { processTopic, actorTopic } from './constants';
5-
6-
const middleware: Middleware = () => (next) => (action) => {
7-
next(action);
8-
9-
if (action.type === '@@workflowManager/external/TEST_WORKFLOW') {
10-
WorkflowManagerConfig.unsubscribe([processTopic, actorTopic]);
11-
}
12-
};
3+
import { workflowManagerReducer } from '../../../dist';
134

145
const basicSlice = createSlice({
156
name: '@basic',
@@ -20,5 +11,4 @@ const basicSlice = createSlice({
2011
export const store = configureStore({
2112
reducer: { workflowManagerReducer, basic: basicSlice.reducer },
2213
devTools: process.env.NODE_ENV !== 'production',
23-
middleware: [middleware],
2414
});

0 commit comments

Comments
 (0)