New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for getInitialProps #1532
Comments
What use case would necessitate |
The main issue we have is that, using We could explore a refactor to try to bypass both Changing to a different i18n package which supports |
Why not use shallow routing? I'm not convinced that your specific use case necessitates That said, all that Basically, it should be extremely trivial to use |
Fair enough, agree, we could look at refactoring to bypass both I'll look in to this option you suggest, looks like a good one. Thanks a lot for the response 👍 |
Let me know if I can offer any further guidance! |
So it does not support
|
@slava-lu We have clearly discussed the issue above. If you can use |
Did a little more digging on this today. Apologies, I misspoke at first – I forgot that Supporting This is not something planned for future versions of If your use case involves using Let me know if I can help any further. |
There are ongoing discussions like this one about I would love to find a way to keep |
@DonovanCharpin I have moved to https://github.com/vinissimus/next-translate |
To be clear, that is not what I said at all. If anyone wants to work on a PR for |
@isaachinman Unfortunately I don’t have enough time to contribute. It still works in v7.0.1 so I’m fine with it, it’s just that I would like the new optimizations. Thanks @slava-lu, I will check this library! |
Using |
Why is this issue closed if PRs are welcome? I see this as a quite big issue as using getServerSideProps is detrimental to performance. |
@FINDarkside You've got that wrong – using |
This comment was marked as off-topic.
This comment was marked as off-topic.
That is very much not the case. All users are advised to use
What you are describing is a problem general to NextJs, and not one that |
This comment has been minimized.
This comment has been minimized.
We use runtime configuration which is available to only pages that provide @isaachinman is there a way we can get around this ? |
We ended up migrating to: https://github.com/vinissimus/next-translate |
@timothyhague tried it and ran into a few problems there (aralroca/next-translate#773 (comment)), too. We would like to continue to use next-i18next. if it is possible. But running out of alternatives .. |
PRs welcome. |
@isaachinman i would very much like to contribute, but am very pressed for time at the moment. Is v7 compatible with Next 12 ? or, is that route not possible for us, either ? I think it was wrong to drop support for |
v7 isn't actively maintained, and I'm not actually sure if you'd be able to get away with using Next 12. To be clear, v8 was a ground-up rewrite of
Please don't bump this thread unless you are willing to lend a hand. |
we are using https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration and it doesn't work without getInitialProps |
We too ended up migrating to But if you want to stay with next-i18next, a possible workaround might be to use an api-route to expose the runtime variables. That way you do not need |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Moved to next-translate as well. I was trying to set up i18n using this lib when I got bitten by this issue. Moving to next-translate, I ended up with less glue code. |
NextJS avoids support of |
|
any update on supporting this? |
Next.js only recommends the use of
getStaticProps
andgetServerSideProps
, due to it allowing for static page generation (if that is something you want). It doesn't say that getInitialProps is no longer something you should use, nor that they plan to make it obsolete. In my case, and the case for many others, it makes better sense to continue usinggetInitialProps
.Would you consider returning support for
getInitialProps
?https://nextjs.org/docs/api-reference/data-fetching/getInitialProps
The text was updated successfully, but these errors were encountered: