+1 vote
in JavaScript by
How EXT JS Supports Inheritance?

1 Answer

0 votes
by

In object-oriented programming, the term inheritance can be defined as a technique in which a subclass imports the superclass's properties.

In Ext JS, you can use inheritance in following two ways:

Inheritance with the help of Ext.extend method

  1. Ext.define (employeeApp.view.EmployeeDetailsGrid,         
  2. // EmployeeDetailsGrid uses the feature of Ext JS GridPanel  
  3. {  
  4. extend : 'Ext.grid.GridPanel',  
  5. ...  
  6. });  

Inheritance with the help of Mixins

The mixins keyword helps us to import the class A properties into class B. Usually, mixins are included in the controller, which contains the declaration of various classes such as store, view, etc.

  1. mixins : {  
  2.     Commons : 'DepartmentApp.utils.DepartmentUtils'  
  3. };    

You can also invoke DepartmentUtils class and use it inside the application.

Related questions

+1 vote
0 votes
0 votes
asked May 31, 2020 in NodeJS Essentials by Robindeniel
+1 vote
asked Jun 20, 2021 in Mean Stack by SakshiSharma
...