redux-form : How to display form values on another component

前端 未结 4 1049
小蘑菇
小蘑菇 2021-01-13 00:34

I am using redux-form 6.0.0-rc.5 and I am trying to display the form values as they are entered by the user.

However, I want these values to be displayed from anothe

4条回答
  •  北海茫月
    2021-01-13 01:20

    I had the same problem. Apparently, 'values' is a saved name in redux-form. Using Iurii Budnikov advice I managed to solve the problem - just change the the variable name from 'values' to something else in your connect call:

    List = connect(
      state => ({
        formValues: getFormValues(state.form.formName)
      })
    )(List)
    

提交回复
热议问题