diff --git a/packages/v1-core/lib/configureRoot.ts b/packages/v1-core/lib/configureRoot.ts index 4ca3f66..5e7b024 100644 --- a/packages/v1-core/lib/configureRoot.ts +++ b/packages/v1-core/lib/configureRoot.ts @@ -5,7 +5,7 @@ import { Reducer, Middleware, } from 'redux'; -//import { useSystem } from './System'; +import { useSystem } from './System'; export function configureRoot(args: { rootReducer: Reducer; @@ -15,11 +15,11 @@ export function configureRoot(args: { args.rootReducer, compose(applyMiddleware(...args.middlewares)) ); - // const system = useSystem(); + const system = useSystem(); - // store.subscribe(() => { - // system.afterHandlers.forEach((s) => s()); - // }); + store.subscribe(() => { + system.afterHandlers.forEach((s) => s()); + }); // store.subscribe(() => { // // const nextTask = system.taksQueue.popTask(); // // if(nextTask) { @@ -28,5 +28,6 @@ export function configureRoot(args: { // // }) // // } // }); + return store; } diff --git a/packages/v1-core/lib/createMiddleware.ts b/packages/v1-core/lib/createMiddleware.ts index 31e57a1..7113ebb 100644 --- a/packages/v1-core/lib/createMiddleware.ts +++ b/packages/v1-core/lib/createMiddleware.ts @@ -60,10 +60,10 @@ export const makeProcMiddleware = ( if (instance) { onInit(instance, actionPayload); } - if (instance.updateAfter) { + if (instance.watchAfter) { // get list of events form config // check if contains then call - system.afterHandlers.push(() => instance.updateAfter); + system.afterHandlers.push(() => instance.watchAfter); } } if (updateConfigs.length && !skipUpdate) { diff --git a/packages/v1-core/package.json b/packages/v1-core/package.json index 084540b..0a88380 100644 --- a/packages/v1-core/package.json +++ b/packages/v1-core/package.json @@ -1,6 +1,6 @@ { "name": "@reflexio/core-v1", - "version": "1.1.3", + "version": "1.1.4", "description": "Reflexio core-v1 package", "files": ["lib", "index.d.ts", "readme.md"], "keywords": ["react", "redux"],