最近搞Next.js的SSR部署一直报错,hydrate时候各种DOM对不上,是不是我getServerSideProps写法有问题啊
export async function getServerSideProps(context) {
const res = await fetch(`https://api.example.com/data`);
const data = await res.json();
return {
props: { data },
};
}
登录/注册