packages/js-toolkit/abstracts/Base/index.js
/**
   * Terminate a child instance when it is not needed anymore.
   * @return {void}
   */
Terminate a child instance when it is not needed anymore.
@return {void}
Terminate a child instance when it is not needed anymore . @return { void }
$terminate() {
    if (__DEV__) {
      debug(this, '$terminate');
    }
    this.$destroy();
    callMethod(this, 'terminated');
    Object.defineProperty(this.$el, '__base__', {
      value: 'terminated',
      configurable: false,
      writable: false,
    });
  }
$terminate ( ) { if ( __DEV__ ) { debug ( this , '$terminate' ) ; } this . $destroy ( ) ; callMethod ( this , 'terminated' ) ; Object . defineProperty ( this . $el , '__base__' , { value : 'terminated' , configurable : false , writable : false , } ) ; }
Terminate a child instance when it is not needed anymore.
Terminate a child instance when it is not needed anymore .
// First, destroy the component. // Execute the `terminated` hook if it exists // Delete the reference to the instance // delete this.$el.__base__; // And update its status to prevent re-instantiation when accessing the // parent's `$children` property