redux-form: A small breaking change in React v15 impacts redux-form compatibility
I’m getting a bunch of uncontrolled input errors: facebook/react#5864, facebook/react#5821.
Here’s a dirty workaround:
const { fields: { field = '' } } = this.props;
if (!field.value) field.value = '';
Update
15.0.0-rc.1 is released.
I realize v0.15 is alpha but I figured I’d report it before it turns into a show-stopping bug.
🍺
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 24 (9 by maintainers)
Commits related to this issue
- avoided null values. fixes problem reported on #703 — committed to redux-form/redux-form by erikras 8 years ago
- avoided null values. fixes problem reported on #703 — committed to redux-form/redux-form by erikras 8 years ago
Just to verify that I’m understanding the issue, the problem is that the
valueprop cannot beundefined?Is that an accurate summary?
I’m seeing this again in 6.0.0-alpha.8.
Warning:``value``prop on``input``should not be null. Consider using the empty string to clear the component or``undefined``for uncontrolled components.React v15 support released with
redux-form v5.0.0.I am still seeing this issue on v5.2.5
valuechanges tonullonFocusof the inputnullthrowsLooks like empty string is the way to go.
facebook/react@98d3327a5dd325481e1c92c0e68289956778be6b#L408-L418
Correct. Components should not switch from uncontrolled to controlled, or vice versa, where