April 2020
Intermediate to advanced
292 pages
6h 50m
English
Seven chapters into this book, and this is the moment you’ve been waiting for—your first Component! Here’s to hoping you aren’t underwhelmed.
We have two things to do with this Component. We need it to subscribe to where its commands will be, and we need it to handle those commands. Let’s start with the top-level function this Component defines:
| 1: | function build ({ messageStore }) { |
| - | const identityCommandHandlers = |
| - | createIdentityCommandHandlers({ messageStore }) |
| - | const identityCommandSubscription = messageStore.createSubscription({ |
| 5: | streamName: 'identity:command', |
| - | handlers: identityCommandHandlers, |
| - | subscriberId: 'components:identity:command' ... |
Read now
Unlock full access