-
Couldn't load subscription status.
- Fork 49.7k
Closed
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
Description
Look , I got this problem, it shows on my console. which is
app.js:1 Uncaught TypeError: Cannot read property 'getHostNode' of null
and I don't know wtf is this Error, and another serious problem is here ,
here is my code :
componentDidMount() {
console.log('mounted')
getData(function (data) { //get data from my backend
console.log('got data: ' + data);
this.setState({
data: data
})
}.bind(this))
}
//data fetching function
render() {
console.log(this.state.data); // I loged this on my console. it should log twice right?
const log = this.state.data.filter(val => val.code == this.props.params.id)[0];
console.log(log) // this will log twice as well
and here is my log
[]
undefined
and that's it , I know this code may not look very good , but this problem is killing me , I try to debug it but I just can't
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug