I am using Fabric React with SPFx. I want to use one component public method to another component. How can be possible to reuse method?
My Parent Component:
export class PanelSmallRightExample2 extends React.Component<
{
...
public _onShowPanel1()
{
alert("other");
};
}
Accessing Parent method into child:
import { PanelSmallRightExample2 } from './PanelExample_1';
let panelExample = React.createElement(PanelSmallRightExample2);
now, by "panelExample" object not accessible my child method.
Please help me.