0
eingestellt ist. Warum bekomme ich immer noch this.state of undefined error, wenn ein Zustand im Konstruktor einen Standardzustand hat?this.state of undefined, obwohl der Standardstatus auf null oder
constructor() {
super()
this.state = {
data: data,
q: null
}
}
filterC(o) {
if (this.state.q) { //wtf??
return o['Id'].includes(this.state.q)
}
return o
}
Demo: https://codesandbox.io/s/v35r8vyqwl
Wie wird 'filterC' genannt? –
Problem ist mit dieser Bindung, überprüfen Sie, wie dies auf verschiedene Arten in reagieren zu reagieren https://stackoverflow.com/questions/47734862/why-reducer-does-not-respond-to-the-action/47740056#47740056 – ram1993