Skip to content

next-i18next with styled-component #1485

Answered by isaachinman
ffan0811 asked this question in Q&A
Discussion options

You must be logged in to vote

Well, I think we've got two obvious solutions:

  1. Start supporting getInitialProps in next-i18next
  2. Drop requirement for getInitialProps in styled-components

Bear in mind that:

getInitialProps will disable Automatic Static Optimization.

I'd recommend you investigate the issue on the NextJs/styled-components side, as there are probably more users of styled-components than next-i18next, and requiring getInitialProps is requiring all users to take a big performance hit.

This may be relevant:

vercel/next.js#22065

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ffan0811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants