-
Notifications
You must be signed in to change notification settings - Fork 380
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
docs: various changes #1870
docs: various changes #1870
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1870 +/- ##
=======================================
Coverage 76.66% 76.66%
=======================================
Files 81 81
Lines 2083 2083
Branches 532 532
=======================================
Hits 1597 1597
Misses 375 375
Partials 111 111 ☔ View full report in Codecov by Sentry. |
}; | ||
``` | ||
:::info | ||
For those who prefer not to use Babel, Lingui offers the [SWC Plugin](/docs/ref/swc-plugin.md) as an alternative. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many projects, such as those using newer versions of NextJS, do not use babel, and so I think we should have a "fork" all the way at the top that leads to separate installation instructions for SWC and for babel. Maybe using Tabs: https://docusaurus.io/docs/markdown-features/tabs)
I have been trying to set up a nextJS app with the pages router and RSC and I'd love to write docs for that at some point if it works :D. I'm not sure if that's going to be a separate guide (probably yes). Either way, I think we should warn people as soon as possible that installing babel macros doesn't make sense if you're using SWC. And we should probably also say clearly that we don't yet have a clear supported path for RSC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vonovak thank you for pointing, a separate Next.js article would be the best!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about RSC support and probably we can document the current PoC with the @lingui/react/server
approach until we have a clearer approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vonovak added the MDX tabs as you suggested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be really nice, to have that article. I also would like to warn people in that article that using global t
macro would be harmful in the hybrid applications such as NextJs. And thanks to new useLingui macro-hook now we have a much better alternative. I also think if we don't need a global instance of i18n configured, we could simplify a lot initialization in nextjs to something like that: #1339 (comment)
Co-authored-by: Vojtech Novak <vonovak@gmail.com>
3934642
to
4fc422a
Compare
4fc422a
to
e14cb2a
Compare
Description
Types of changes
Checklist