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
state
onPress={()=>this.saveitem()}
React.Component {} ...
constructor(props) { super(props); state={ text:"", mylist:[] } }
2.1m questions
2.1m answers
60 comments
57.0k users