Posts by loabrantes • 1 point
1 post
-
0
votes2
answers835
viewsA: Using API in React JS
The componentDidMount does not need to be asynchronous, so try: componentDidMount() { api.swAPI("films", "get", (response) => { this.setState({ filmes: response.data }); }); } In the template…