Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

React Redux Form v0.9.6

Compare
Choose a tag to compare
@davidkpiano davidkpiano released this 02 Apr 21:44
· 1318 commits to master since this release

New Actions

  • actions.setSubmitFailed(model) - Sets the .submitFailed property of the field/form component to true.

New Action Behavior

  • actions.submit(...) will now dispatch actions.setSubmitFailed(...) upon a promise failure. The state behavior is maintained with regard to pending and submitted, with the addition of submitFailed being set to true.

Field Component Enhancements

  • Now it's possible to add custom event handlers directly on the onChange, onFocus, and onBlur props of controls inside of <Field>, which will be called before any other RRF-specific action is dispatched:
// Will alert "I am changed!" and then proceed with dispatching
// a change action for foo.bar.
<Field model="foo.bar">
  <input type="text" onChange={() => alert('I am changed!')} />
</Field>

Form Reducer Deprecation Warnings

The following redundant field/form properties will be deprecated as of v1.0:

  • blur - use the inverse of focus instead
  • dirty - use the inverse of pristine instead
  • untouched - use the inverse of touched instead

When getting these properties, a deprecation warning will appear in the console. These are deprecated in favor of the positive counterparts, and will improve performance slightly as the field/form objects become less property-heavy.