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

React Redux Form v1.4.0

Compare
Choose a tag to compare
@davidkpiano davidkpiano released this 09 Dec 19:29
· 509 commits to master since this release

New Component: <Fieldset> πŸŽ‰

The <Fieldset> component is a way to contain related fields. This might not sound like much, but it's incredibly useful when creating reusable groups of controls. Here's an example:

// in render():
<Form model="user">
  <Fieldset model=".address">
    <Control.text model=".city" />
    <Control.text model=".state" />
    <Control.text model=".zip" />
  </Fieldset>
</Form>

For more info, check out the docs: http://davidkpiano.github.io/react-redux-form/docs/api/Fieldset.html

No More lodash dependency!

Lodash is a fantastic library, but having to install the entire library for RRF to work is pretty cumbersome. RRF was refactored to only require two important lodash functions: lodash.get and lodash.toPath. This is the magic that makes RRF so easy to implement. So now, only those two functions from lodash will be installed instead of the entire library.

New getDispatch prop for <LocalForm>

This is especially useful if you wanted to manually reset (or any other action) to a <LocalForm>. See #560 for example usage (and this is also in the docs).

<LocalForm
  model="user"
  getDispatch={(dispatch) => this.formDispatch = dispatch}
/>

Fixes and Enhancements

  • TypeScript fixes to control props. Thanks, @sl33kr! #563