Skip to content

Instantly share code, notes, and snippets.

@techomoro

techomoro/App.js Secret

Created Oct 4, 2020
Embed
What would you like to do?
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