Improvements
Internally, Formik uses an undocumented utility function called setIn
to support deep state updates (and nested fields). In this release, we altered the behavior of setIn
to shallow copy unchanged siblings along the update path to be updated instead of deeply cloning the whole object.
This should enable significant performance improvements when implementing
shouldComponentUpdate
methods for nested structures as it allows direct
comparison of object / arrays to see if there has been changes to any of
their child values (because unchanged objects retain the same JS
reference).
Commits