Skip to content

Instantly share code, notes, and snippets.

@alexandargyurov
Created June 8, 2020 18:31
Show Gist options
  • Select an option

  • Save alexandargyurov/8bbc38f85a6f742a04a8df0a2a280fd4 to your computer and use it in GitHub Desktop.

Select an option

Save alexandargyurov/8bbc38f85a6f742a04a8df0a2a280fd4 to your computer and use it in GitHub Desktop.
async componentDidMount() {
const blogId = await this.blogNameToId(this.props.match.params.blogTitle)
const blogData = await fetch(
"https://notion-api.splitbee.io/v1/page/" + blogId
).then(res => res.json());
this.setState({ blockMap: blogData })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment