Dar*_*ong 7 javascript reactjs server-side-rendering next.js google-cloud-firestore
I have this NextJS site where there is this getStaticProps that load data from Firestore.
I have this:
return {
props: {
allPosts: posts,
},
revalidate: 60,
}
Run Code Online (Sandbox Code Playgroud)
where from what I know will load data from firebase every one minute. However, it doesn't seem to work and data are just not updated.
Is this revalidate an experimental feature? Anyway that I can get it to work? Else I would have to rebuild and export frequently.
如果你想要增量静态再生(revalidate标志为getStaticProps),那么你需要运行 NextJs 服务器(next start命令),没有服务器就没有任何东西可以执行请求并生成新的静态文件。
next export 仅使用构建时可用的数据生成一次静态文件。
| 归档时间: |
|
| 查看次数: |
4202 次 |
| 最近记录: |