Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
416 views
in Technique[技术] by (71.8m points)

reactjs - undefined is not an object evaluating ('_this.state') Error

Whenever I resolve this problem a new issue arises like Can't find variable: state , so what's happening here? actually, I made a screen where I'm using onPress={()=>this.saveitem()} on a button and on the other hand declaring state variable in below Class, export default class App extends React.Component {} ... I imported that specific component but in vain ... help me out brothers... enter code here

constructor(props) {
    super(props);
  state={
    text:"",
    mylist:[]
  }
}
question from:https://stackoverflow.com/questions/65832476/undefined-is-not-an-object-evaluating-this-state-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...