Fetch request in class component is not returning data or updating state
问题 I have refactored a component to add a fetch request to an AWS database, the data is accessible and a quick mock on codesandbox works. However when used in this context it errors as... TypeError: Cannot read property 'forEach' of undefined Unhandled Rejection (TypeError): this.setState is not a function and in the console... {error: null, isLoaded: true, users: Array(0), undefined} code below... constructor() { this.mapUserCountries = {}; this.state = { error: null, isLoaded: true, users: []