module.exports= class APP extends React.Component {
constructor(props){
super(props);
this.state = {
key1:\'key1\',
key2:\'key2\'
};
rend
To call Parent's method from child, you can pass the reference like this.
Parent Class
(this.parentReference = ref)}
parentReference = {this.parentMethod.bind(this)}
/>
parentMethod(data) {
}
Child Class
let data = {
id: 'xyz',
name: 'zzz',
};
//This will call the method of parent
this.props.parentReference(data);