constructor(children, props) {
    this.addNonEnumerableProperties({
      $id: Object(_utils_generateId__WEBPACK_IMPORTED_MODULE_1__["default"])(),
      $name: this.constructor.name,
      $config: (typeof this.config === 'function') ? this.config() : {
        listen: true,
      },
      $store: {},
      $events: {},
      $privateStore: new _utils_PrivateStore__WEBPACK_IMPORTED_MODULE_2__["default"](),
    });

    this.on = (typeof this.on === 'function') ? this.on() : {};
    this.children = [];

    // Appends headless components
    this.copyObjToInstance(_consts_GLOBALS__WEBPACK_IMPORTED_MODULE_0__["default"].HEADLESS_COMPONENTS, 'head');

    this.state = Object.assign(
      (typeof this.state === 'function') ? this.state() : {},
      props || {}
    );

    Object(_utils_skipInProductionAndTest__WEBPACK_IMPORTED_MODULE_5__["default"])(() => Object.freeze(this.state));

    if (children) this.setChildren(children);
  }
@param {Node[]|*[]} [children]
@param {object} [o.props]