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

Releases: davidkpiano/react-redux-form

React Redux Form v0.13.5

04 Jun 19:03
Compare
Choose a tag to compare

Tweaks and Bug Fixes

  • TypeScript definitions are now top-level: #258
  • Form-level validity is now properly calculated for <Form> components: #246 #255

React Redux Form v0.13.4

02 Jun 17:34
Compare
Choose a tag to compare

** Enhancements **

  • HUGE thanks to @hsrobflavorus for his work on creating a TypeScript definition file, recent up to the current version: #248 🎉
  • Some performance optimizations made in preventing redundantly dispatched setErrors actions.
  • More examples added! Huge thanks to @etrepum: #234

React Redux Form v0.13.3

31 May 15:15
Compare
Choose a tag to compare
  • Slightly easier way to handle custom components in <Field> by specifying the mapProps={...} prop (function), which will be executed for every child inside <Field>:
<Field model="foo.bar" mapProps={controls.text}>
  <MyCustomTextInput />
</Field>

Best practice: Use this only when you have a single child inside <Field> for best results.

  • Fixed #238 which threw an error if a formReducer for a <Form> component did not exist.

React Redux Form v0.13.2

30 May 11:18
Compare
Choose a tag to compare

Examples!

  • Thanks to @etrepum, we've set up the foundation for runnable examples in the repo, with more to come! Right now, the basic quick start example is available by running:
npm install
npm run examples

Feel free to let us know which examples you'd like to see in the repo!

Performance enhancements

  • The <Errors> component no longer requires the entire state in mapStateToProps, nor does the <Form> component, resulting in a significant performance boost. #237
  • The <Form> component now benefits from React's shallowCompare for efficient rendering.

Bug fixes

  • The name="..." attribute will no longer be overridden for controls inside <Field>. #241
  • (internal) getFormStateKey is now properly cached, thanks to @pauljz #231

React Redux Form v0.13.0

26 May 23:10
Compare
Choose a tag to compare

Performance and Size Enhancements

  • Many lodash dependencies were removed, such as isEqual, merge, etc. There is still a lot of work to be done in cutting down the size, but it's a noticeable improvement.
  • (Internal) props are no longer sequenced and mapped on every single update in the <Control> component - instead, they are "cached" in the component's internal state until the <Control> absolutely needs to rerender. Only then will props be remapped. This results in huge performance benefits ( #227 ). More is to be done in this area!
  • Redundant form-wide validation actions have been eliminated for <Form> components that don't have any validators. In the future, RRF will be even smarter about when it can batch and/or avoid dispatching actions when it can predict that the form state will not change.

Other Minor Changes

  • The actions.xor(model, item, [iteratee]) now takes in an optional iteratee 3rd argument that answers the question, "Which item am I looking for?" Here's an example:
// Suppose you have a state that looks like this:
//  { foo: { collection: [{ a: 1 }, { a: 2 }] } }

dispatch(actions.xor('foo.collection', { a: 2 }, (val) => val.a === 2));
// => will remove `{ a: 2 }` because it is found in the collection

dispatch(actions.xor('foo.collection', { a: 42 }, (val) => val.a === 42));
// => will add `{ a: 42 }` because it is not present in the collection

For most intents and purposes, you will not need to worry about this if you are dealing with primitive (numbers, strings, etc.) values. That is, actions.xor(['a', 'b', 'c'], 'b') will continue to work as expected.

React Redux Form v0.12.7

25 May 04:38
Compare
Choose a tag to compare

Bug Fixes

  • Previously, for most cases, a text <input /> could not be uncontrolled; i.e., it was forced to be controlled, and the value prop was overridden. This was undesirable in some instances, and now, <input value={...} /> inside <Field> will maintain its original value prop, if it exists. This yields two new scenarios:
// force an input to be uncontrolled
<Field model="foo.bar">
  <input value={undefined} />
</Field>

// control an input externally
<Field model="foo.bar">
  <input value={this.state.value} onChange={...} />
</Field>
  • The SET_SUBMITTED and SET_SUBMIT_FAILED actions now propagate to the form's underlying fields, so the .submitted and .submitFailed field props accurately represent those of the parent form. #222

React Redux Form v0.12.6

23 May 14:01
Compare
Choose a tag to compare

Internal Changes

  • get() and toPath() wrapped to maintain compatibility with all versions of Lodash 4.x
  • import shallowCompare from 'react/lib/shallowCompare'; - using internal instead of external dependency to maintain compatibility with React 0.14.x and React 15.x
  • getFieldFromState fixes, thanks to @spalger: #216

React Redux Form v0.12.5

19 May 21:21
Compare
Choose a tag to compare

Enhancements

  • Now, .retouched is set to true once any change happens, as opposed to blur, which makes sense, since the field is already "touched" after a submit is attempted.

Internals

  • The pre-existing behavior of cloneElement is brought back to <Control> when existing components are passed into control={...}, to maintain ref and improve performance.

React Redux Form v0.12.3

17 May 14:52
Compare
Choose a tag to compare

Optimizations

  • react-redux-shallow-compare is now added to the <Field> component to prevent renders when the field has not changed. #205
  • Some lodash functions were internalized to reduce bundle size, such as partial and capitalize.

v0.12.2

09 May 14:06
Compare
Choose a tag to compare
  • New (mostly internal) field flag: .validated indicates whether the field's current value has been validated or not.
    • Whenever the value changes (CHANGE action), .validated will be reset to false since that value has not been validated yet.
    • Once it is validated, .validated = true.
  • Enhancement: now, validators defined on <Field> will get executed whenever it detects that its model's value has changed.
    • This means you don't have to directly interact with the field in order to trigger validation. External changes will also trigger validation. UX and DX win!
    • For more info, see #183 and #195