addComponent(component, data = null, before = null, noAdd = false) {
    data = data || this.data;
    this.components = this.components || [];
    component = this.hook('addComponent', component, data, before, noAdd);
    const comp = this.createComponent(component, this.options, data, before ? before : null);
    if (noAdd) {
      return comp;
    }
    return comp;
  }
Add a new component to the components array.
@param {import('@formio/core').Component} component - The component JSON schema to add.
@param {object} data - The submission data object to house the data for this component.
@param {HTMLElement} before - A DOM element to insert this element before.
@param {boolean} [noAdd] - A possibly extraneous boolean flag.
@returns {any} - The created component instance.