Skip to content

Conversation

@philibea
Copy link
Collaborator

@philibea philibea commented May 17, 2021

Add a new state namespaces on Provider, this state re-present namespace that are already loaded.
Add isLoaded on useTranslation hook, this params will help to avoid multi-rerender when it's not needed.
Add ReactDom unstable_batchedUpdates to minimize number of renders

@philibea philibea force-pushed the i18n-namespaces-loaded branch 2 times, most recently from ef3c436 to 73e42c3 Compare May 18, 2021 16:12
@philibea philibea marked this pull request as ready for review May 18, 2021 16:26
@philibea philibea force-pushed the i18n-namespaces-loaded branch from 73e42c3 to c4d9fac Compare May 18, 2021 16:47
@codecov
Copy link

codecov bot commented May 18, 2021

Codecov Report

Merging #183 (27bad93) into master (de2536d) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 27bad93 differs from pull request most recent head 56807b1. Consider uploading reports for the commit 56807b1 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##            master      #183   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          264       267    +3     
  Branches        39        39           
=========================================
+ Hits           264       267    +3     
Impacted Files Coverage Δ
packages/use-i18n/src/index.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de2536d...56807b1. Read the comment docs.

@philibea philibea changed the title fix(i18n): add loaded namespace ffeat(i18n): add loaded namespace isLoad into useTranslation May 18, 2021
@philibea philibea changed the title ffeat(i18n): add loaded namespace isLoad into useTranslation feat(i18n): add loaded namespace isLoad into useTranslation May 18, 2021
@philibea philibea self-assigned this May 18, 2021
@philibea philibea added enhancement New feature or request performance labels May 18, 2021
@philibea philibea force-pushed the i18n-namespaces-loaded branch from c4d9fac to a047eb5 Compare May 18, 2021 16:52
@philibea philibea changed the title feat(i18n): add loaded namespace isLoad into useTranslation feat(i18n): add loaded namespaces and isLoaded into useTranslation May 18, 2021
@philibea philibea requested a review from vincentaudebert May 19, 2021 07:41
@philibea philibea force-pushed the i18n-namespaces-loaded branch from 27bad93 to ba6085f Compare May 19, 2021 07:43
@philibea philibea force-pushed the i18n-namespaces-loaded branch from ba6085f to 3636333 Compare May 19, 2021 08:16
@philibea philibea force-pushed the i18n-namespaces-loaded branch from 3636333 to 56807b1 Compare May 19, 2021 08:16
@philibea philibea merged commit 13e2ded into master May 19, 2021
@philibea philibea deleted the i18n-namespaces-loaded branch May 19, 2021 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants