nextjs getinitialprops not working

Solutions on MaxInterview for nextjs getinitialprops not working by the best coders in the world

showing results for - "nextjs getinitialprops not working"
Niko
31 Jun 2017
1//Try not use axios if you're using it.
2//if not try use exactly this syntax
3export async function getStaticProps() {
4  const res = await fetch(`http://localhost:3000/api/blogs`)
5  const Blogs = await res.json()
6  return {
7    props: {
8      Blogs,
9    },
10  }
11}