Skip to content
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

Allow passing of custom getState function #112

Merged
merged 1 commit into from
Jul 26, 2018

Conversation

thchia
Copy link
Collaborator

@thchia thchia commented Jul 25, 2018

For #82.

Changes

Added an optional getState() prop to LocalizeProvider. If passed, it will be used to access state.localize instead of the default dot notation.

Note that the localize state itself is always a plain JS object, so there should be no need to consider any changes deeper than this.

@thchia thchia requested a review from ryandrewjohnson July 25, 2018 10:18
@codecov
Copy link

codecov bot commented Jul 25, 2018

Codecov Report

Merging #112 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
+ Coverage   95.54%   95.56%   +0.01%     
==========================================
  Files           6        6              
  Lines         247      248       +1     
  Branches       74       75       +1     
==========================================
+ Hits          236      237       +1     
  Misses         10       10              
  Partials        1        1
Impacted Files Coverage Δ
src/LocalizeProvider.js 85.71% <100%> (+0.52%) ⬆️

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 66e5ee2...21b1717. Read the comment docs.

@ryandrewjohnson
Copy link
Owner

@thchia looks good. Also noticed you updated the docs 👍

@ryandrewjohnson ryandrewjohnson merged commit 027334f into ryandrewjohnson:master Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants