removeComponentByKey(key, fn = null) {
    const comp = this.getComponent(key, (component, components) => {
      this.removeComponent(component, components);
      if (fn) {
        fn(component, components);
      }
    });
    if (!comp) {
      if (fn) {
        fn(null);
      }
      return null;
    }
  }
Removes a component provided the API key of that component.
@param {string} key - The API key of the component to remove.
@param {Function} fn - Called once the component is removed.
@returns {null|void} - Returns nothing if the component is not found.