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

Lazy evaluation of form and field state #596

Merged
merged 1 commit into from
Aug 19, 2019
Merged

Lazy evaluation of form and field state #596

merged 1 commit into from
Aug 19, 2019

Conversation

erikras
Copy link
Member

@erikras erikras commented Aug 19, 2019

Has the added benefit of making all the state values readonly.

That should only be a breaking change for the naughtiest of users.

@codecov
Copy link

codecov bot commented Aug 19, 2019

Codecov Report

Merging #596 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #596   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          16     17    +1     
  Lines         234    248   +14     
  Branches       57     57           
=====================================
+ Hits          234    248   +14
Impacted Files Coverage Δ
src/FormSpy.js 100% <ø> (ø) ⬆️
src/Field.js 100% <ø> (ø) ⬆️
src/getters.js 100% <100%> (ø)
src/useField.js 100% <100%> (ø) ⬆️
src/useFormState.js 100% <100%> (ø) ⬆️
src/renderComponent.js 100% <100%> (ø) ⬆️
src/ReactFinalForm.js 100% <100%> (ø) ⬆️

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 60434b8...7d12161. Read the comment docs.

@erikras erikras merged commit abd6d62 into master Aug 19, 2019
@erikras erikras deleted the lazy-state branch August 19, 2019 18:33
@Andarist
Copy link
Contributor

@erikras are u sure this is safe? seems really unsafe to async react

@lock
Copy link

lock bot commented Sep 19, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 19, 2019
@erikras
Copy link
Member Author

erikras commented Nov 18, 2019

Can you explain why? I'm not sure I understand. How is accessing a getter less "sync" than a property? This also makes them readonly.

@erikras
Copy link
Member Author

erikras commented Nov 18, 2019

Published in v6.3.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants