-
-
Save techomoro/07a8ad970437fc8bb937a3188d24730e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
componentDidMount() { | |
return fetch(`https://techomoro.com/wp-json/wp/v2/posts/`) | |
.then((response) => response.json()) | |
.then((responseJson) => { | |
this.setState({ | |
posts: responseJson, | |
}) | |
}) | |
.catch((error) => { | |
console.error(error); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment