I am trying to combine one of the style examples with-aphrodite and with-apollo-and-redux
It seems that _document.js does not work along with the withData wrapper as expected.
Cannot automatically buffer without a document
Error: Cannot automatically buffer without a document
at injectGeneratedCSSOnce (/Users/Max/Development/testrepo/node_modules/aphrodite/lib/inject.js:168:19)
at injectStyleOnce (/Users/Max/Development/testrepo/node_modules/aphrodite/lib/inject.js:194:5)
at injectAndGetClassName (/Users/Max/Development/testrepo/node_modules/aphrodite/lib/inject.js:287:5)
at css (/Users/Max/Development/testrepo/node_modules/aphrodite/lib/exports.js:146:54)
at exports.default (/Users/Max/Development/testrepo/.next/dist/components/layout/configuration/Languages.js:44:34)
at walkTree (/Users/Max/Development/testrepo/node_modules/react-apollo/lib/server.js:34:21)
at walkTree (/Users/Max/Development/testrepo/node_modules/react-apollo/lib/server.js:37:13)
at walkTree (/Users/Max/Development/testrepo/node_modules/react-apollo/lib/server.js:37:13)
at getQueriesFromTree (/Users/Max/Development/testrepo/node_modules/react-apollo/lib/server.js:58:5)
at getDataFromTree (/Users/Max/Development/testrepo/node_modules/react-apollo/lib/server.js:73:19)
_document is only rendered server side. It's meant to be used to change the document structure. It's not meant to load data there 馃槃
The issue does not even imply loading data from the _document.js.
The problem lies with Aphrodite SSR stylesheet injection not cooperating with HOC wrapper
Okay, re-opening 馃憣
Any ideas on this?
on getInitialProps of my route I am deciding in which language the page will be displayed and I want to fill <html> lang attribute with proper value. The value is being stored in the Redux store
@dzek69 there is currently no way to do that.
@makstr could you provide an example so we can test this?
Since v3.0.1 we provide a way to wrap the App component https://github.com/zeit/next.js/pull/2010
Most helpful comment
Any ideas on this?
on getInitialProps of my route I am deciding in which language the page will be displayed and I want to fill
<html>lang attribute with proper value. The value is being stored in the Redux store