Cosmic Blog tutorial - Fetch post
const fetchPost = slug => fetch(`${API_URL}/post/${slug}`) | |
.then(res => res.json()) | |
.then(json => console.log(json)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment