react-final-form icon indicating copy to clipboard operation
react-final-form copied to clipboard

Memoize input and meta

Open asazernik opened this issue 6 years ago • 3 comments

Preventing unnecessary re-renders is the name of the game. Users will only see gains if they pass in a pure/memoized component, but if they do it's a big difference.

asazernik avatar Oct 01 '19 22:10 asazernik

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #640   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          17     17           
  Lines         251    257    +6     
  Branches       58     57    -1     
=====================================
+ Hits          251    257    +6
Impacted Files Coverage Δ
src/useField.js 100% <100%> (ø) :arrow_up:

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 692f1d1...40060ae. Read the comment docs.

codecov[bot] avatar Oct 01 '19 22:10 codecov[bot]

Note on second glance - because of extensive whitespace changes, the diffs are best viewed with --color-words --ignore-space-change

asazernik avatar Oct 21 '19 23:10 asazernik

Can you show me a render counting test that passes if meta and input are memoized but fails if they are not?

erikras avatar Oct 28 '19 02:10 erikras