Skip to content

Commit

Permalink
core 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
asapovk committed Feb 19, 2024
1 parent 88fb0ed commit 9481911
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions packages/v1-core/lib/configureRoot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Reducer,
Middleware,
} from 'redux';
//import { useSystem } from './System';
import { useSystem } from './System';

export function configureRoot(args: {
rootReducer: Reducer;
Expand All @@ -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) {
Expand All @@ -28,5 +28,6 @@ export function configureRoot(args: {
// // })
// // }
// });

return store;
}
4 changes: 2 additions & 2 deletions packages/v1-core/lib/createMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/v1-core/package.json
Original file line number Diff line number Diff line change
@@ -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"],
Expand Down

0 comments on commit 9481911

Please sign in to comment.