Parameters
- server: Server
- domain: string
- model: ProjectionModel<unknown, View>
Returns {
dispatch: ((dispatcher, action, optimisticId?) => {
error: unknown;
success: false;
} | {
success: true;
});
projection: ((dispatcher) => View);
unregister: (() => void);
}
An object with methods to unregister, and get projections and to dispatch actions to the model.
dispatch: ((dispatcher, action, optimisticId?) => {
error: unknown;
success: false;
} | {
success: true;
})
- (dispatcher, action, optimisticId?): {
error: unknown;
success: false;
} | {
success: true;
} Parameters
- dispatcher: string
- action: Message
Optional
optimisticId: string
Returns {
error: unknown;
success: false;
} | {
success: true;
}
projection: ((dispatcher) => View)
unregister: (() => void)
Register the projection to the server.