Skip to content

Commit

Permalink
Add BaseControllerV2 support to ComposableController (#447)
Browse files Browse the repository at this point in the history
The ComposableController now supports controllers that are based upon
BaseControllerV2. These newer controllers use the controller messaging
system to communicate, so the messenger is now a required constructor
parameter if any BaseControllerV2 controllers are used.

The `name` property in `BaseControllerV2` had to be made public for the
ComposableController to properly construct its state. This seems OK. It
was only kept private initially until a use was found for it.
  • Loading branch information
Gudahtt authored Apr 22, 2021
1 parent 644f980 commit 5777094
Show file tree
Hide file tree
Showing 3 changed files with 557 additions and 159 deletions.
7 changes: 6 additions & 1 deletion src/BaseControllerV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ export class BaseController<
string | never
>;

private name: N;
/**
* The name of the controller.
*
* This is used by the ComposableController to construct a composed application state.
*/
public readonly name: N;

public readonly metadata: StateMetadata<S>;

Expand Down
Loading

0 comments on commit 5777094

Please sign in to comment.