v7
is here!
The "breaking change" that warrants this major version bump is extremely minor and will most likely only affect a small minority of you, but I have pledged to be more strict with Semantic Versioning, so it's up to 7
we go.
However, there is one exciting announcement to go along with this release:
🎉 Flow Support 🎉
As of v7
, redux-form
officially supports Flow for static type checking. Flow has been implemented internally in all the library's code (except for tests), and the exported API also has types provided. It even found a few bugs and bad type assumptions along the way.
I guarantee you that I have made some mistakes in doing this, and you should expect some rapid iteration on fixing the flow bugs as they are reported in the coming weeks.
⚠️ (Tiny) Breaking Change ⚠️
undefined
andfalse
are now treated as NOT equal. This will affect yourdirty
/pristine
state, as well as whether or not a field is rerendered when the value goes fromundefined
tofalse
(previously it did not). Most commonly this will manifest itself in a form with no initial values that contains a checkbox: if you check the checkbox totrue
, and then uncheck the checkbox (tofalse
) your form will bedirty
because the checkbox field's original value ofundefined
is not!== false
. If you want such a form to return topristine
after unchecking the checkbox, you will need to provide an initial value offalse
for that field. #3081 #3061 #1762 #1774 #1993 #2600 #2978.
Maintenance
Bug Fixes
- Minor bug fix related to
immutableProps
introduced inv6.8.0
. #3052 #3048 - Fixed bug where a field got unregistered even if there was another copy of the same field on the page. #3064
- Efficiency improvement related to
syncErrors
andsyncWarnings
to avoid needless rerendering. #3072 - Fixed bug with async errors being cleared wrongly on
STOP_ASYNC_VALIDATION
. #3068 #2953 - Fixed bug involving
FieldArray
rerendering. #3089 #3008 - Fixed bug involving "missing" values in arrays. #3105 #3095
- Fixed bug where fields were not rerendering when their
error
orwarn
props changed. #3094 #3012