Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Latest commit

 

History

History
21 lines (12 loc) · 372 Bytes

README.md

File metadata and controls

21 lines (12 loc) · 372 Bytes

Basic Premises

f(state, event) -> state f(state, command) -> [event]

pollEvents = stores.eventsFor('Poll')

pollState = pollEvents.reduce(function (state, event) {

}, {});

CreatePoll(pollState, {})

newEvents = PollAggregate.dispatchCommand(state, command)

save( pollEvent.concat(newEvents))

events = PollAggregate .fromEvents(events) .dispatchCommand(command)