Open
Description
For now it can directly import StateActor
from https://github.com/hackers4peace/reciprocity-tracker-state-actor later we can move it to Web Worker. Few notes
- Only StateService knows about StateActor. StateService itself doesn't know anything about Redux used by StateActor, only knows format of messages (actions) sent to StateActor and format of State send from StateActor to UiActor.
- It provides action creators to components that need it
- It can practically copy action creators from https://github.com/elf-pavlik/agent-form/blob/wip/actions.ts just rename transaction to exchange and remove actions with actionTypes not included in state-actor repo. Actions use stateActorHandle(send) to send messages.
- It provides observable state to components that need it
- It can almost copy UiAgent from https://github.com/elf-pavlik/agent-form/blob/wip/UiActor.ts without any history management and connect onMessage to simply update the Observable state which components subscribe to directly.
- StateActor includes TS interface definitions which components may need, they can import them directly from
reciprocity-tracker-state-actor/lib/interfaces
ping @samurex
Metadata
Metadata
Assignees
Labels
No labels