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

Handle lazy indeterminate static properties #1014

Merged
merged 3 commits into from
Jun 9, 2018

Conversation

taion
Copy link
Contributor

@taion taion commented Jun 9, 2018

No description provided.

@theKashey
Copy link
Collaborator

No tests 😭
Things like this should be covered by tests, to not to be suddenly broken in the future.

@taion
Copy link
Contributor Author

taion commented Jun 9, 2018

@theKashey

I'm back with more "fun" on weird React features used in Relay.

Relay now does this: facebook/relay@0573d77

So... we need to also lazily proxy over getDerivedStateFromProps. Sigh.

@taion
Copy link
Contributor Author

taion commented Jun 9, 2018

Sorry, tests forthcoming! Wanted to get the PR up to point people at what was happening.

@codecov-io
Copy link

codecov-io commented Jun 9, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1014      +/-   ##
==========================================
+ Coverage   86.52%   86.54%   +0.01%     
==========================================
  Files          31       31              
  Lines         824      825       +1     
  Branches      193      193              
==========================================
+ Hits          713      714       +1     
  Misses         92       92              
  Partials       19       19
Impacted Files Coverage Δ
src/proxy/createClassProxy.js 97.24% <100%> (+0.01%) ⬆️

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 c8a36e7...ba10324. Read the comment docs.

@taion
Copy link
Contributor Author

taion commented Jun 9, 2018

Updated the test case to cover this.

@theKashey
Copy link
Collaborator

👍

@theKashey
Copy link
Collaborator

@taion - ok to merge? Is this the only change you need?

@taion
Copy link
Contributor Author

taion commented Jun 9, 2018

Yup, this is the only change. I’m not 100% sure that my use of transferStaticProps there is correct, but it’s probably okay. At least, it fixes the problem I see.

@theKashey
Copy link
Collaborator

It sounds to be correct. Anyway - I should not break anything.

@theKashey theKashey merged commit 8189dd4 into gaearon:master Jun 9, 2018
@theKashey
Copy link
Collaborator

v 4.3.1

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.

3 participants