Dies ist meine Reaktion Komponente:Wie machen diese verfügbar Funktion innerhalb machen
constructor(props) {
super(props);
this.state = {
};
this.showChart = this.showChart.bind(this)
}
showChart() {
console.log('test')
}
render() {
{this.showChart} //throws error that, this is undefined
return() (
{this.showChart} //prints test
)
}
Nun, wenn ich die Funktion von render()
aber außerhalb return()
was soll ich tun nennen wollen?
Yeah du hast Recht –
Glücklich, dass es dir geholfen hat –