JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="//extjs.cachefly.net/ext-4.1.0-gpl/resources/css/ext-all-gray-debug.css" />
<script src="//extjs.cachefly.net/ext-4.1.0-gpl/ext-all-dev.js"></script>
JavaScript
Ext.define('MyPanel', {
extend: 'Ext.panel.Panel',
title: 'My Panel',
initComponent: function() {
var self = this;
Ext.applyIf(self, {
items: [
{
xtype: 'button',
text: 'MyButton',
handler: function() {
console.log(this); //the button
console.log(self); //the form
}}
]
});
self.callParent(arguments);
}
});
Ext.onReady(function() {
var p = new MyPanel({
renderTo: Ext.getBody()
});
});