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

React Redux Form v1.3.0

Compare
Choose a tag to compare
@davidkpiano davidkpiano released this 02 Dec 15:55
· 538 commits to master since this release

πŸ™… No more redux-thunk!

This minor version of RRF includes an important change - the peer dependency on redux-thunk has been removed. That means that all built-in functionality with RRF will work as expected, without requiring redux-thunk. This greatly simplifies project setup and allows you to use existing middleware workflows, such as redux-saga and redux-observable, without conflicts.

With that said, many helper actions still require redux-thunk, such as actions.submit, actions.validate, actions.filter, etc. These are all clearly outlined in the action creator docs - most common actions do not require redux-thunk, and all action thunk creators can be reimplemented easily with whatever you're using, whether that's sagas or epics.

See #550.

πŸ†• The <Control.button> component and disabled={...} superpowers!

There's a new control component for buttons! It defaults to a submit button (as per the HTML5 spec), so you can use mapProps to add any custom RRF-based prop mappings to it based on the model field state.

Also, the <Control.button>, as well as all other controls, now have a special disabled prop that works like the standard disabled prop, but also accepts a:

  • function that takes in fieldState
  • object as an iteratee
  • string as an iteratee

and more. See the docs for more info.

// Disable the submit button when the form is invalid
<Control.button
  model="user"
  disabled={{ valid: false }}
>
  Submit!
</Control.button>

πŸ“– New FAQs page!

I'm going to start adding frequently asked questions in the documentation. Feel free to suggest questions that should be answered there!

πŸ”§ New Redux-Form comparison examples!

I'm also starting to add a bunch of examples ported directly from the Redux-Form examples if you want to make a comparison between the two libraries or migrate easily, or you're just curious. Competition breeds innovation!

Other fixes and enhancements

  • <Control.text /> will now explicity set type="text". #551