带头部的服务器端渲染

时间:2021-05-17 18:21:36

标签: node.js reactjs express server-side-rendering

是否可以仅对 <head></head> 数据进行服务器端渲染?我正在尝试使用 next.js 之类的功能:

export async function getServerSideProps(context) {
  return {
    props: {}, // will be passed to the page component as props
  }
}

因此,在 express 服务器中,它将捕获导出的函数 getServerSideProps 并在 <head> 标记中设置数据。我不想要 next.js 的所有其他功能,因此我不想使用 next.js。甚至有可能吗?

0 个答案:

没有答案