-
Notifications
You must be signed in to change notification settings - Fork 379
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
Ensure render of I18nProvider in async scenarios #839
Ensure render of I18nProvider in async scenarios #839
Conversation
prevent extra re-render by checking if it is required
@Bertg is attempting to deploy a commit to the LinguiJS Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report
@@ Coverage Diff @@
## main #839 +/- ##
==========================================
+ Coverage 84.25% 84.27% +0.02%
==========================================
Files 38 38
Lines 1251 1259 +8
Branches 332 334 +2
==========================================
+ Hits 1054 1061 +7
Misses 117 117
- Partials 80 81 +1
Continue to review full report at Codecov.
|
Perfect, thanks!
Let's try it as it is and figure out how to improve it later. I guess we could add a signal |
Quick question... may I be added to the contributor list? :) |
@Bertg I don't think we have an explicit list of contributors 🤔 The contributors section in README is generated automatically from repository contributors. I guess it's just cached and you should appear there in few days. And if I haven't said it explicitly, thank you for your help! I really appreaciate everyone who's willing to spend their free time contributing to this project 🙏 |
You're welcome :) Actually felt kind of embarrassed asking, but this is a project I would be proud of having my name attached to. |
Yeah, this is a valid point 👍 We could use GitHub Action to automatically generate list of contributors after each pull request. I'm gonna check it later. GitHub Actions are really powerfull 🚀 |
This is related to #834
This PR solves 2 issues:
Some more thoughts about this PR and problem:
forceRenderOnLocaleChange
should be separated fromdontRenderIfNoLocaleIsActivated
i18n.on("activated"
which also triggers when first observed (if already triggered before). That way the extra call tosetRenderKey
in the effect is never needed.