April 2020
Intermediate to advanced
292 pages
6h 50m
English
To get this working, wire it into the system config:
| 1: | // ... |
| - | const createIdentityComponent = require('./components/identity') |
| - | function createConfig ({ env }) { |
| - | // ... |
| 5: | const identityComponent = createIdentityComponent({ messageStore }) |
| - | const components = [ |
| - | identityComponent, |
| - | ] |
| - | return { |
| 10: | // ... |
| - | identityComponent, |
| - | } |
| - | } |
Line 2 requires the Component’s constructor. Line 5 instantiates the Component, injecting the messageStore dependency. With the Component instantiated, at line 7 we add it to the components array. Adding it to this array is what lets the system know it needs to call the Component’s start function. ...
Read now
Unlock full access