core
core copied to clipboard
Non-controller classes with empty state should not inherit from `BaseController`
Current controller classes with empty state
- [x] #4072
- [x] #4433
- [ ] #4434
- [ ] #4435
Requirements
- Should not inherit from
BaseControllerV1orBaseController. - Should not use the
Controllersuffix in its name. - Types for
ControllerState,ControllerGetStateAction,ControllerStateChangeEventshould not be defined or exported. - Should accept
messengeras a constructor option. -
messengershould be defined with allowlists that enable the class to make all communications with other controller classes that were previously supported. - Should not accept any class method callbacks as constructor options. Messenger actions/events should be used to communicate instead.
- In some cases, methods that implement API interactions should be extracted into a dedicated
serviceclass.