我终于设法在Next.js中获得了SSR,以使用@ apollo / react-hooks,但是目前我需要用withApollo
包装每个页面,例如:
export default withApollo(IndexPage)
完整来源:https://github.com/tomsoderlund/nextjs-graphql-hooks-boilerplate/blob/master/pages/articleList.js
如何将withApollo
HOC提升到_app.js或_document.js?