Not sure if there's a better way but this way works if you want two change the value of two inputs, based on the change of just one:
const Form = ({change, dispatch}) => {
const onFirstChange = (event) => {
const text = event.target.value;
// make change actions for both inputs
const changeFirst = change('first', text);
const changeSecond = change('second', text + text.toUpperCase());
// dispatch them for both
dispatch(changeFirst);
dispatch(changeSecond);
};
return (<div>
First: <Field name='first' component='input' type='text' onChange={onFirstChange} /><br />
Second: <Field name='second' component='input' type='text' />
</div>
)
};
const MyForm = reduxForm({
form: 'foo'
})(Form);
// END EXAMPLE
ReactDOM.render(
<Provider store={store}>
<MyForm />
</Provider>,
document.getElementById('root')
);
JSFiddle demo: https://jsfiddle.net/jonahe/399cpnz1/1/