[英]NEXT.js how to sync server rendered props in redux state?
I am using getStaticProps to get data from server side.我正在使用 getStaticProps 从服务器端获取数据。 How i can sync it with redux?
我如何将它与 redux 同步?
export async function getStaticProps() {
return { props: { trans: "Some data"} };
}
You can check this example - with-redux .您可以查看此示例 - with-redux 。
Here are some notices:以下是一些注意事项:
pages/ssg.js
file.pages/ssg.js
文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.