Skip to content
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

Merged
merged 11 commits into from Apr 8, 2017
Merged

Add CQRS StoreGroup #2

merged 11 commits into from Apr 8, 2017

Conversation

azu
Copy link
Owner

@azu azu commented Apr 1, 2017

Re-think about StoreGroup

  • Should StoreGroup does Store#getStore(prevState)?
    • prevState is ...?

CQRS

  • UseCase dispatch change
  • StoreGroup receive change
  • Context receive change - Is it needed?
  • View getState

@azu
Copy link
Owner Author

azu commented Apr 1, 2017

Can this store group the other store group?

@azu
Copy link
Owner Author

azu commented Apr 2, 2017

workflow

return true;
}
// TODO: should use equals
if (typeof prevStateValue.equals === "function") {
Copy link
Owner Author

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?

Copy link
Owner Author

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
Copy link
Owner Author

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) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azu azu mentioned this pull request Apr 6, 2017
@azu azu mentioned this pull request Apr 7, 2017
3 tasks
@azu azu merged commit 7b7f55a into master Apr 8, 2017
@azu azu deleted the cqrs-store-group branch April 8, 2017 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant