this.setState is undefined inside a async function in js code example
Example: this.setState is undefined inside a async function in js
.then((res) => this.setState({intentOptions: res.data}));
.then((res) => this.setState({intentOptions: res.data}));