Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

fix: Use updater function in setState for Formbot updates #58

Merged
merged 2 commits into from
Aug 14, 2019

Conversation

erikshestopal
Copy link
Contributor

Summary

Using a function as a state updater seems to fix an issue with stale state data preventing a validation function from running.

@erikshestopal erikshestopal requested review from schlegz and a team August 14, 2019 21:26
@ghost ghost requested a review from cehsu August 14, 2019 21:26
@codecov
Copy link

codecov bot commented Aug 14, 2019

Codecov Report

Merging #58 into master will decrease coverage by 0.29%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #58     +/-   ##
=========================================
- Coverage   66.89%   66.59%   -0.3%     
=========================================
  Files          22       22             
  Lines         447      449      +2     
  Branches       92       91      -1     
=========================================
  Hits          299      299             
- Misses        118      121      +3     
+ Partials       30       29      -1
Impacted Files Coverage Δ
src/Form/Formbot.js 2.81% <0%> (-0.09%) ⬇️

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 68df3a2...dfe931c. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Aug 14, 2019

Codecov Report

Merging #58 into master will decrease coverage by 0.29%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #58     +/-   ##
=========================================
- Coverage   66.89%   66.59%   -0.3%     
=========================================
  Files          22       22             
  Lines         447      449      +2     
  Branches       92       91      -1     
=========================================
  Hits          299      299             
- Misses        118      121      +3     
+ Partials       30       29      -1
Impacted Files Coverage Δ
src/Form/Formbot.js 2.81% <0%> (-0.09%) ⬇️

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 68df3a2...dfe931c. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 14, 2019

Codecov Report

Merging #58 into master will decrease coverage by 0.59%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #58     +/-   ##
=========================================
- Coverage   66.89%   66.29%   -0.6%     
=========================================
  Files          22       22             
  Lines         447      451      +4     
  Branches       92       91      -1     
=========================================
  Hits          299      299             
- Misses        118      123      +5     
+ Partials       30       29      -1
Impacted Files Coverage Δ
src/Form/Formbot.js 2.73% <0%> (-0.16%) ⬇️

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 68df3a2...9af33a5. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 14, 2019

Codecov Report

Merging #58 into master will decrease coverage by 0.29%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #58     +/-   ##
=========================================
- Coverage   66.89%   66.59%   -0.3%     
=========================================
  Files          22       22             
  Lines         447      449      +2     
  Branches       92       91      -1     
=========================================
  Hits          299      299             
- Misses        118      121      +3     
+ Partials       30       29      -1
Impacted Files Coverage Δ
src/Form/Formbot.js 2.81% <0%> (-0.09%) ⬇️

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 68df3a2...dfe931c. Read the comment docs.

Copy link

@choochootrain choochootrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, a test would be nice if its not a huge PITA

Copy link

@choochootrain choochootrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gogogo

@erikshestopal erikshestopal merged commit 70fa72b into master Aug 14, 2019
@erikshestopal erikshestopal deleted the fix/use-fn-for-state-updates branch August 14, 2019 22:39
mathewmorris added a commit that referenced this pull request Aug 23, 2019
* v5:
  feat(Button): Icon support and default style updates (#51)
  feat(Colors): Updates colors (#60)
  chore(release): 4.1.6
  fix(FormError): Fix crash in case context is null (#59)
  chore(release): 4.1.5
  fix: Use updater function in setState for Formbot updates (#58)
  chore(release): 4.1.4
  fix(validations): Fix handling of async validations as well as order of onChange notification (#57)
  chore(release): 4.1.3
  Async Formbot Validations (#56)
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.

4 participants