score:3

Accepted answer
componentDidMount() {
    fetch('http://localhost:5000/api/continents')
        .then(res => res.json())
        .then(continents => this.setState({continents: continents.data}));
}

score:1

this.setState({continents: continents.data})

Related Query

More Query from same tag