Java Hashtable содержитValue () не работает [дубликат]

Вы пытались:

componentDidMount(){
  this.setState({ location: getLocation().bind(this) });
}

Или то же самое, но более чистый код:

constructor() {
  // other stuff
  this.getLocation = getLocation().bind(this)
}

componentDidMount(){
  this.setState({ location: this.getLocation() });
}

Изменить:

Вы должны import { getLocation} from 'path/of/file'

0
задан Anna Li 19 January 2019 в 07:15
поделиться