MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / unregisterComponent

Method unregisterComponent

src/monogatari.ts:937–945  ·  view source on GitHub ↗

* @static unregisterComponent - Removes a component from the components list. * Any component you want to remove should be removed before calling the * init () method so that their Mounting cycle is not executed. * * @param {string} component - ID of the Component to unregister. Remembe

(component: string)

Source from the content-addressed store, hash-verified

935 * each component must have an unique ID.
936 */
937 static unregisterComponent (component: string) {
938 if (!this.global ('_didSetup')) {
939 this._components = this.components ().filter ((c) => c.tag.toLowerCase() !== component.toLowerCase());
940 } else {
941 FancyError.show ('engine:component:unregister_after_setup', {
942 component: component
943 });
944 }
945 }
946
947 /**
948 * @static components - Returns the list of registered Components.

Callers 1

registerComponentMethod · 0.95

Calls 3

globalMethod · 0.95
componentsMethod · 0.95
showMethod · 0.45

Tested by

no test coverage detected