everyone.
I\'m having weird issues with testing a state update after an async call happening in componentDidMount.
Here\'s my component code:
I had a look at https://www.npmjs.com/package/request and figured out that the 'body' parameter is missing from the callback.
It should look like
...
request('https://api.github.com/users', (err, res, body) => {
if (!err && res.statusCode === 200) {
this.setState({
usersList: body.slice(0)
});
}
...