in src/search/HistorySearch.js [27:38]
componentDidUpdate(prevProps, prevState) {
const input = this.state.currInput;
if (this.state.currInput !== prevState.currInput) {
queryCall(this.state.currInput).then(data => {
// If current input remains unchanged after callback, then set the state.
if (input === this.state.currInput) {
this.setState({ metadata: [] });
this.setState({ metadata: data });
}
});
}
}