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:
forceRenderOnLocaleChangeshould be separated fromdontRenderIfNoLocaleIsActivatedi18n.on("activated"which also triggers when first observed (if already triggered before). That way the extra call tosetRenderKeyin the effect is never needed.