未验证 提交 2af5a0e4 编写于 作者: K Kenneth Lum 提交者: GitHub

it is props: { posts } (#23004)

changing `props: posts` to `props: { posts }`
上级 e7a22afe
......@@ -156,7 +156,7 @@ export async function getStaticProps() {
const res = await fetch('https://.../posts')
const posts = await res.json()
// By returning { props: posts }, the Blog component
// By returning { props: { posts } }, the Blog component
// will receive `posts` as a prop at build time
return {
props: {
......@@ -325,7 +325,7 @@ export async function getStaticProps() {
content: fileContents,
}
})
// By returning { props: posts }, the Blog component
// By returning { props: { posts } }, the Blog component
// will receive `posts` as a prop at build time
return {
props: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册