autoManageComponentById(addOrUpdate, id, componentCreationCallback) {
    let component = this.getComponentById(id);
    if (addOrUpdate) {
      if (component == null) {
        component = componentCreationCallback();
        component.setId(id);
        this.addComponent(component);
      } else {
        this.updateComponent(component);
      }
    } else if (component != null) {
      this.removeComponent(component);
    }
  }
Convenience method to add, remove, or update a component based on a boolean and an id.
@param {Boolean} addOrUpdate whether to add or remove component (if add and component exists, will update)
@param {String} id
@param {Function} componentCreationCallback function that creates and returns the component