New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CQRS StoreGroup #2
Conversation
Can this store group the other store group? |
src/store/CQRSStoreGroup.ts
Outdated
return true; | ||
} | ||
// TODO: should use equals | ||
if (typeof prevStateValue.equals === "function") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will move to the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡
Move State#equals
to Store#shoudStateUpdate(prevState, nextState)
.
and remove it.
}); | ||
this.appRepository = appRepository; | ||
} | ||
|
||
getState(): { counterState: CounterState } { | ||
// 更新したstateを返す | ||
getState(...args: Array<any>): any; // TODO: hack will be removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Store should be fixed
}); | ||
} | ||
|
||
reduce(payload: Payload) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReduceStore should be fixed
Re-think about StoreGroup
Store#getStore(prevState)
?prevState
is ...?CQRS